Skip to content

Commit 5e9ffa2

Browse files
minor #21695 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 (peterrehm)
This PR was merged into the 2.8 branch. Discussion ---------- Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | - | License | MIT | Doc PR | - Continued work to make Symfony PHPUnit 6 compatible. Commits ------- dbe8898 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
2 parents fa5d5de + f964db7 commit 5e9ffa2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tests/DependencyInjection/Compiler/FormPassTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,12 @@ public function testPrivateTaggedServices($id, $tagName, $expectedExceptionMessa
227227
$container->setDefinition('form.extension', $extDefinition);
228228
$container->register($id, 'stdClass')->setPublic(false)->addTag($tagName);
229229

230-
$this->setExpectedException('\InvalidArgumentException', $expectedExceptionMessage);
230+
if (method_exists($this, 'expectException')) {
231+
$this->expectException('InvalidArgumentException');
232+
$this->expectExceptionMessage($expectedExceptionMessage);
233+
} else {
234+
$this->setExpectedException('InvalidArgumentException', $expectedExceptionMessage);
235+
}
231236

232237
$container->compile();
233238
}

0 commit comments

Comments
 (0)