Skip to content

Commit 73682ba

Browse files
committed
Merge branch '3.2'
* 3.2: fixed obsolete getMock() usage fixed obsolete getMock() usage fixed obsolete getMock() usage fixed obsolete getMock() usage [WebProfilerBundle] Display multiple HTTP headers in WDT do not remove the Twig ExceptionController service removed obsolete condition do not try to register incomplete definitions
2 parents 672fce0 + dec56a1 commit 73682ba

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

Tests/Compiler/ExtensionCompilerPassTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ExtensionCompilerPassTest extends \PHPUnit_Framework_TestCase
2323

2424
protected function setUp()
2525
{
26-
$this->container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');
26+
$this->container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->getMock();
2727
$this->pass = new ExtensionCompilerPass();
2828
}
2929

@@ -46,10 +46,10 @@ public function testProcess()
4646

4747
private function createExtensionMock($hasInlineCompile)
4848
{
49-
return $this->getMock('Symfony\Component\DependencyInjection\\'.(
49+
return $this->getMockBuilder('Symfony\Component\DependencyInjection\\'.(
5050
$hasInlineCompile
5151
? 'Compiler\CompilerPassInterface'
5252
: 'Extension\ExtensionInterface'
53-
));
53+
))->getMock();
5454
}
5555
}

Tests/Compiler/MergeExtensionConfigurationPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function testExpressionLanguageProviderForwarding()
2121
{
2222
$tmpProviders = array();
2323

24-
$extension = $this->getMock('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface');
24+
$extension = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock();
2525
$extension->expects($this->any())
2626
->method('getXsdValidationBasePath')
2727
->will($this->returnValue(false));
@@ -37,7 +37,7 @@ public function testExpressionLanguageProviderForwarding()
3737
$tmpProviders = $container->getExpressionLanguageProviders();
3838
}));
3939

40-
$provider = $this->getMock('Symfony\\Component\\ExpressionLanguage\\ExpressionFunctionProviderInterface');
40+
$provider = $this->getMockBuilder('Symfony\\Component\\ExpressionLanguage\\ExpressionFunctionProviderInterface')->getMock();
4141
$container = new ContainerBuilder(new ParameterBag());
4242
$container->registerExtension($extension);
4343
$container->prependExtensionConfig('foo', array('bar' => true));

Tests/Compiler/PassConfigTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ public function testPassOrdering()
2323
{
2424
$config = new PassConfig();
2525

26-
$pass1 = $this->getMock(CompilerPassInterface::class);
26+
$pass1 = $this->getMockBuilder(CompilerPassInterface::class)->getMock();
2727
$config->addPass($pass1, PassConfig::TYPE_BEFORE_OPTIMIZATION, 10);
2828

29-
$pass2 = $this->getMock(CompilerPassInterface::class);
29+
$pass2 = $this->getMockBuilder(CompilerPassInterface::class)->getMock();
3030
$config->addPass($pass2, PassConfig::TYPE_BEFORE_OPTIMIZATION, 30);
3131

3232
$this->assertSame(array($pass2, $pass1), $config->getBeforeOptimizationPasses());

Tests/ContainerBuilderTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ public function testAddGetCompilerPass()
293293
$builder = new ContainerBuilder();
294294
$builder->setResourceTracking(false);
295295
$defaultPasses = $builder->getCompiler()->getPassConfig()->getPasses();
296-
$builder->addCompilerPass($pass1 = $this->getMock('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface'), PassConfig::TYPE_BEFORE_OPTIMIZATION, -5);
297-
$builder->addCompilerPass($pass2 = $this->getMock('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface'), PassConfig::TYPE_BEFORE_OPTIMIZATION, 10);
296+
$builder->addCompilerPass($pass1 = $this->getMockBuilder('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface')->getMock(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -5);
297+
$builder->addCompilerPass($pass2 = $this->getMockBuilder('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface')->getMock(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 10);
298298

299299
$passes = $builder->getCompiler()->getPassConfig()->getPasses();
300300
$this->assertCount(count($passes) - 2, $defaultPasses);
@@ -669,7 +669,7 @@ public function testExtension()
669669

670670
public function testRegisteredButNotLoadedExtension()
671671
{
672-
$extension = $this->getMock('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface');
672+
$extension = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock();
673673
$extension->expects($this->once())->method('getAlias')->will($this->returnValue('project'));
674674
$extension->expects($this->never())->method('load');
675675

@@ -681,7 +681,7 @@ public function testRegisteredButNotLoadedExtension()
681681

682682
public function testRegisteredAndLoadedExtension()
683683
{
684-
$extension = $this->getMock('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface');
684+
$extension = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock();
685685
$extension->expects($this->exactly(2))->method('getAlias')->will($this->returnValue('project'));
686686
$extension->expects($this->once())->method('load')->with(array(array('foo' => 'bar')));
687687

Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function testInstantiateProxy()
2525
{
2626
$instantiator = new RealServiceInstantiator();
2727
$instance = new \stdClass();
28-
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
28+
$container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();
2929
$callback = function () use ($instance) {
3030
return $instance;
3131
};

0 commit comments

Comments
 (0)