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 17
17
use CodeIgniter \HTTP \IncomingRequest ;
18
18
use CodeIgniter \HTTP \RequestInterface ;
19
19
use CodeIgniter \HTTP \Response ;
20
+ use CodeIgniter \HTTP \ResponseInterface ;
20
21
use CodeIgniter \Test \CIUnitTestCase ;
21
22
use Config \Filters as FilterConfig ;
22
23
use PHPUnit \Framework \Attributes \BackupGlobals ;
@@ -60,11 +61,13 @@ public function testDebugToolbarFilter(): void
60
61
$ expectedAfter = $ this ->response ;
61
62
62
63
// nothing should change here, since we have no before logic
63
- $ filter ->before ($ this ->request );
64
+ $ result = $ filter ->before ($ this ->request );
64
65
$ this ->assertSame ($ expectedBefore , $ this ->request );
66
+ $ this ->assertNull ($ result );
65
67
66
68
// 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 );
68
70
$ this ->assertSame ($ expectedAfter , $ this ->response );
71
+ $ this ->assertNotInstanceOf (ResponseInterface::class, $ result );
69
72
}
70
73
}
You can’t perform that action at this time.
0 commit comments