File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed
Bridge/Symfony/Validator/EventListener Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,10 @@ parameters:
125
125
path: %currentWorkingDirectory%/src/Action/ExceptionAction.php
126
126
- '#Call to method get(Class|Headers|StatusCode)\(\) on an unknown class Symfony\\Component\\ErrorHandler\\Exception\\FlattenException\.#'
127
127
-
128
- message: "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component.+' and 'getException' will always evaluate to false\\.#"
129
- path: %currentWorkingDirectory%/tests/Bridge/Symfony/Validator/EventListener/ValidationExceptionListenerTest.php
128
+ message: "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component.+' and 'getThrowable' will always evaluate to false\\.#"
129
+ paths:
130
+ - %currentWorkingDirectory%/tests/Bridge/Symfony/Validator/EventListener/ValidationExceptionListenerTest.php
131
+ - %currentWorkingDirectory%/tests/EventListener/ExceptionListenerTest.php
130
132
-
131
133
message: '#Instanceof between bool\|float\|int|null and ArrayObject will always evaluate to false\.#'
132
134
paths:
Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ class ValidationExceptionListenerTest extends TestCase
31
31
public function testNotValidationException ()
32
32
{
33
33
$ eventProphecy = $ this ->prophesize (ExceptionEvent::class);
34
- if (method_exists (ExceptionEvent::class, 'getException ' )) {
35
- $ eventProphecy ->getException ()->willReturn (new \Exception ())->shouldBeCalled ();
36
- } else {
34
+ if (method_exists (ExceptionEvent::class, 'getThrowable ' )) {
37
35
$ eventProphecy ->getThrowable ()->willReturn (new \Exception ())->shouldBeCalled ();
36
+ } else {
37
+ $ eventProphecy ->getException ()->willReturn (new \Exception ())->shouldBeCalled ();
38
38
}
39
39
$ eventProphecy ->setResponse ()->shouldNotBeCalled ();
40
40
@@ -50,10 +50,10 @@ public function testValidationException()
50
50
$ list = new ConstraintViolationList ([]);
51
51
52
52
$ eventProphecy = $ this ->prophesize (ExceptionEvent::class);
53
- if (method_exists (ExceptionEvent::class, 'getException ' )) {
54
- $ eventProphecy ->getException ()->willReturn (new ValidationException ($ list ))->shouldBeCalled ();
55
- } else {
53
+ if (method_exists (ExceptionEvent::class, 'getThrowable ' )) {
56
54
$ eventProphecy ->getThrowable ()->willReturn (new ValidationException ($ list ))->shouldBeCalled ();
55
+ } else {
56
+ $ eventProphecy ->getException ()->willReturn (new ValidationException ($ list ))->shouldBeCalled ();
57
57
}
58
58
$ eventProphecy ->getRequest ()->willReturn (new Request ())->shouldBeCalled ();
59
59
$ eventProphecy ->setResponse (Argument::allOf (
Original file line number Diff line number Diff line change @@ -36,7 +36,11 @@ public function testOnKernelException(Request $request)
36
36
37
37
$ eventProphecy = $ this ->prophesize (ExceptionEvent::class);
38
38
$ eventProphecy ->getRequest ()->willReturn ($ request );
39
- $ eventProphecy ->getException ()->willReturn (new \Exception ());
39
+ if (method_exists (ExceptionEvent::class, 'getThrowable ' )) {
40
+ $ eventProphecy ->getThrowable ()->willReturn (new \Exception ());
41
+ } else {
42
+ $ eventProphecy ->getException ()->willReturn (new \Exception ());
43
+ }
40
44
$ eventProphecy ->getKernel ()->willReturn ($ kernel );
41
45
$ eventProphecy ->setResponse (Argument::type (Response::class))->shouldBeCalled ();
42
46
You can’t perform that action at this time.
0 commit comments