File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1010namespace Symfony \WebpackEncoreBundle \Tests \EventListener ;
1111
1212use Symfony \Component \HttpFoundation \Request ;
13+ use Symfony \Component \HttpKernel \Event \ExceptionEvent ;
1314use Symfony \Component \HttpKernel \Event \GetResponseForExceptionEvent ;
1415use Symfony \Component \HttpKernel \HttpKernelInterface ;
1516use PHPUnit \Framework \TestCase ;
@@ -39,7 +40,8 @@ public function testItResetsAllEntrypointLookups()
3940
4041 $ request = new Request ();
4142 $ exception = new \Exception ();
42- $ event = new GetResponseForExceptionEvent (
43+ $ exceptionClass = class_exists (ExceptionEvent::class) ? ExceptionEvent::class : GetResponseForExceptionEvent::class;
44+ $ event = new $ exceptionClass (
4345 $ this ->createMock (HttpKernelInterface::class),
4446 $ request ,
4547 HttpKernelInterface::MASTER_REQUEST ,
You can’t perform that action at this time.
0 commit comments