File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1717use CodeIgniter \HTTP \IncomingRequest ;
1818use CodeIgniter \HTTP \RequestInterface ;
1919use CodeIgniter \HTTP \Response ;
20+ use CodeIgniter \HTTP \ResponseInterface ;
2021use CodeIgniter \Test \CIUnitTestCase ;
2122use Config \Filters as FilterConfig ;
2223use PHPUnit \Framework \Attributes \BackupGlobals ;
@@ -60,11 +61,13 @@ public function testDebugToolbarFilter(): void
6061 $ expectedAfter = $ this ->response ;
6162
6263 // nothing should change here, since we have no before logic
63- $ filter ->before ($ this ->request );
64+ $ result = $ filter ->before ($ this ->request );
6465 $ this ->assertSame ($ expectedBefore , $ this ->request );
66+ $ this ->assertNull ($ result );
6567
6668 // nothing should change here, since we are running in the CLI
67- $ filter ->after ($ this ->request , $ this ->response );
69+ $ result = $ filter ->after ($ this ->request , $ this ->response );
6870 $ this ->assertSame ($ expectedAfter , $ this ->response );
71+ $ this ->assertNotInstanceOf (ResponseInterface::class, $ result );
6972 }
7073}
You can’t perform that action at this time.
0 commit comments