Skip to content

Commit 236dca3

Browse files
authored
refactor: Update Toolbar tests (codeigniter4#9479)
1 parent 6acd5b9 commit 236dca3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/system/Filters/DebugToolbarTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use CodeIgniter\HTTP\IncomingRequest;
1818
use CodeIgniter\HTTP\RequestInterface;
1919
use CodeIgniter\HTTP\Response;
20+
use CodeIgniter\HTTP\ResponseInterface;
2021
use CodeIgniter\Test\CIUnitTestCase;
2122
use Config\Filters as FilterConfig;
2223
use 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
}

0 commit comments

Comments
 (0)