Skip to content

Commit

Permalink
simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Oct 10, 2024
1 parent 1224a66 commit cf7d75d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Tests/Handler/ChromePhpHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,15 @@ class ChromePhpHandlerTest extends TestCase
{
public function testOnKernelResponseShouldNotTriggerDeprecation()
{
$this->expectNotToPerformAssertions();

$request = Request::create('/');
$request->headers->remove('User-Agent');

$response = new Response('foo');
$event = new ResponseEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MAIN_REQUEST, $response);

$error = null;
set_error_handler(function ($type, $message) use (&$error) { $error = $message; }, \E_DEPRECATED);

$listener = new ChromePhpHandler();
$listener->onKernelResponse($event);
restore_error_handler();

$this->assertNull($error);
}
}

0 comments on commit cf7d75d

Please sign in to comment.