Skip to content

Commit dddd42d

Browse files
jderussenicolas-grekas
authored andcommitted
Use namespaced Phpunit classes
1 parent 7a42c1b commit dddd42d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Tests/Compiler/ResolveInstanceofConditionalsPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public function testBadInterfaceForAutomaticInstanceofIsOk()
201201
public function testProcessThrowsExceptionForAutoconfiguredCalls()
202202
{
203203
$this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
204-
$this->expectExceptionMessage('Autoconfigured instanceof for type "PHPUnit\Framework\TestCase" defines method calls but these are not supported and should be removed.');
204+
$this->expectExceptionMessageRegExp('/Autoconfigured instanceof for type "PHPUnit[\\\\_]Framework[\\\\_]TestCase" defines method calls but these are not supported and should be removed\./');
205205
$container = new ContainerBuilder();
206206
$container->registerForAutoconfiguration(parent::class)
207207
->addMethodCall('setFoo');
@@ -212,7 +212,7 @@ public function testProcessThrowsExceptionForAutoconfiguredCalls()
212212
public function testProcessThrowsExceptionForArguments()
213213
{
214214
$this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
215-
$this->expectExceptionMessage('Autoconfigured instanceof for type "PHPUnit\Framework\TestCase" defines arguments but these are not supported and should be removed.');
215+
$this->expectExceptionMessageRegExp('/Autoconfigured instanceof for type "PHPUnit[\\\\_]Framework[\\\\_]TestCase" defines arguments but these are not supported and should be removed\./');
216216
$container = new ContainerBuilder();
217217
$container->registerForAutoconfiguration(parent::class)
218218
->addArgument('bar');

Tests/Config/ContainerParametersResourceCheckerTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Tests\Config;
1313

14+
use PHPUnit\Framework\MockObject\MockObject;
1415
use PHPUnit\Framework\TestCase;
1516
use Symfony\Component\Config\ResourceCheckerInterface;
1617
use Symfony\Component\DependencyInjection\Config\ContainerParametersResource;
@@ -52,15 +53,15 @@ public function testIsFresh(callable $mockContainer, $expected)
5253

5354
public function isFreshProvider()
5455
{
55-
yield 'not fresh on missing parameter' => [function (\PHPUnit_Framework_MockObject_MockObject $container) {
56+
yield 'not fresh on missing parameter' => [function (MockObject $container) {
5657
$container->method('hasParameter')->with('locales')->willReturn(false);
5758
}, false];
5859

59-
yield 'not fresh on different value' => [function (\PHPUnit_Framework_MockObject_MockObject $container) {
60+
yield 'not fresh on different value' => [function (MockObject $container) {
6061
$container->method('getParameter')->with('locales')->willReturn(['nl', 'es']);
6162
}, false];
6263

63-
yield 'fresh on every identical parameters' => [function (\PHPUnit_Framework_MockObject_MockObject $container) {
64+
yield 'fresh on every identical parameters' => [function (MockObject $container) {
6465
$container->expects($this->exactly(2))->method('hasParameter')->willReturn(true);
6566
$container->expects($this->exactly(2))->method('getParameter')
6667
->withConsecutive(

0 commit comments

Comments
 (0)