File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/Symfony/Component/Debug/Tests Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,14 @@ class_exists('PHPUnit_Framework_MockObject_Invocation_Object');
59
59
$ that = $ this ;
60
60
$ exceptionCheck = function ($ exception ) use ($ that ) {
61
61
$ that ->assertInstanceOf ('Symfony\Component\Debug\Exception\ContextErrorException ' , $ exception );
62
- $ that ->assertEquals (E_STRICT , $ exception ->getSeverity ());
63
62
$ that ->assertEquals (2 , $ exception ->getLine ());
64
- $ that ->assertStringStartsWith ('Runtime Notice: Declaration of _CompileTimeError::foo() should be compatible with ' , $ exception ->getMessage ());
63
+ if (PHP_VERSION_ID < 70000 ) {
64
+ $ that ->assertEquals (E_STRICT , $ exception ->getSeverity ());
65
+ $ that ->assertStringStartsWith ('Runtime Notice: Declaration of _CompileTimeError::foo() should be compatible with ' , $ exception ->getMessage ());
66
+ } else {
67
+ $ that ->assertEquals (E_WARNING , $ exception ->getSeverity ());
68
+ $ that ->assertStringStartsWith ('Warning: Declaration of _CompileTimeError::foo() should be compatible with ' , $ exception ->getMessage ());
69
+ }
65
70
$ that ->assertArrayHasKey ('bar ' , $ exception ->getContext ());
66
71
};
67
72
You can’t perform that action at this time.
0 commit comments