You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Replaced try/catch block with an @ExpectedException annotation
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This fix doesn't seem like changing anything but thanks to it, PHP 5.3.3 stops segfaulting.
Tests started failing after merging #8285. However, it's not the change which made them failing (the change is totally unrelated to the segfaulting test case). I suspect it has something to do with memory management in the early PHP 5.3 versions. We've had this kind of failures in the past.
Commits
-------
494e803 [DependencyInjection] Replaced try/catch block with an @ExpectedException annotation in a test.
$this->fail('->load() throws an InvalidArgumentException if the loaded file does not exist');
59
-
} catch (\Exception$e) {
60
-
$this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist');
61
-
$this->assertStringStartsWith('The file "foo.ini" does not exist (in: ', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file does not exist');
$this->fail('->load() throws an InvalidArgumentException if the loaded file is not parseable');
74
-
} catch (\Exception$e) {
75
-
$this->assertInstanceOf('\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file is not parseable');
76
-
$this->assertEquals('The "nonvalid.ini" file is not valid.', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file is not parseable');
0 commit comments