Skip to content

Commit a3a9316

Browse files
committed
wip
1 parent ab1536a commit a3a9316

File tree

1 file changed

+6
-25
lines changed

1 file changed

+6
-25
lines changed

tests/Routing/RoutingRouteTest.php

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,28 +1939,6 @@ public function testResponseIsReturned()
19391939
$this->assertNotInstanceOf(JsonResponse::class, $response);
19401940
}
19411941

1942-
public function testRouteFlushController()
1943-
{
1944-
$container = new Container;
1945-
$router = $this->getRouter();
1946-
1947-
$router->get('count', ActionCountStub::class);
1948-
$request = Request::create('count', 'GET');
1949-
1950-
$response = $router->dispatch($request);
1951-
$this->assertSame(1, $response->original['invokedCount']);
1952-
$this->assertSame(1, $response->original['middlewareInvokedCount']);
1953-
1954-
$response = $router->dispatch($request);
1955-
$this->assertSame(2, $response->original['invokedCount']);
1956-
$this->assertSame(2, $response->original['middlewareInvokedCount']);
1957-
1958-
$request->route()->flushController();
1959-
$response = $router->dispatch($request);
1960-
$this->assertSame(1, $response->original['invokedCount']);
1961-
$this->assertSame(1, $response->original['middlewareInvokedCount']);
1962-
}
1963-
19641942
public function testJsonResponseIsReturned()
19651943
{
19661944
$router = $this->getRouter();
@@ -1982,14 +1960,17 @@ public function testRouteFlushController()
19821960
$request = Request::create('count', 'GET');
19831961

19841962
$response = $router->dispatch($request);
1985-
$this->assertSame(1, (int) $response->getContent());
1963+
$this->assertSame(1, $response->original['invokedCount']);
1964+
$this->assertSame(1, $response->original['middlewareInvokedCount']);
19861965

19871966
$response = $router->dispatch($request);
1988-
$this->assertSame(2, (int) $response->getContent());
1967+
$this->assertSame(2, $response->original['invokedCount']);
1968+
$this->assertSame(2, $response->original['middlewareInvokedCount']);
19891969

19901970
$request->route()->flushController();
19911971
$response = $router->dispatch($request);
1992-
$this->assertSame(1, (int) $response->getContent());
1972+
$this->assertSame(1, $response->original['invokedCount']);
1973+
$this->assertSame(1, $response->original['middlewareInvokedCount']);
19931974
}
19941975

19951976
public function testRouteRedirect()

0 commit comments

Comments
 (0)