@@ -1939,28 +1939,6 @@ public function testResponseIsReturned()
1939
1939
$ this ->assertNotInstanceOf (JsonResponse::class, $ response );
1940
1940
}
1941
1941
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
-
1964
1942
public function testJsonResponseIsReturned ()
1965
1943
{
1966
1944
$ router = $ this ->getRouter ();
@@ -1982,14 +1960,17 @@ public function testRouteFlushController()
1982
1960
$ request = Request::create ('count ' , 'GET ' );
1983
1961
1984
1962
$ 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 ' ]);
1986
1965
1987
1966
$ 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 ' ]);
1989
1969
1990
1970
$ request ->route ()->flushController ();
1991
1971
$ 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 ' ]);
1993
1974
}
1994
1975
1995
1976
public function testRouteRedirect ()
0 commit comments