File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class ExtensionCompilerPassTest extends \PHPUnit_Framework_TestCase
23
23
24
24
protected function setUp ()
25
25
{
26
- $ this ->container = $ this ->getMock ('Symfony\Component\DependencyInjection\ContainerBuilder ' );
26
+ $ this ->container = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\ContainerBuilder ' )-> getMock ( );
27
27
$ this ->pass = new ExtensionCompilerPass ();
28
28
}
29
29
@@ -46,10 +46,10 @@ public function testProcess()
46
46
47
47
private function createExtensionMock ($ hasInlineCompile )
48
48
{
49
- return $ this ->getMock ('Symfony\Component\DependencyInjection \\' .(
49
+ return $ this ->getMockBuilder ('Symfony\Component\DependencyInjection \\' .(
50
50
$ hasInlineCompile
51
51
? 'Compiler\CompilerPassInterface '
52
52
: 'Extension\ExtensionInterface '
53
- ));
53
+ ))-> getMock () ;
54
54
}
55
55
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function testExpressionLanguageProviderForwarding()
21
21
{
22
22
$ tmpProviders = array ();
23
23
24
- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
24
+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
25
25
$ extension ->expects ($ this ->any ())
26
26
->method ('getXsdValidationBasePath ' )
27
27
->will ($ this ->returnValue (false ));
@@ -37,7 +37,7 @@ public function testExpressionLanguageProviderForwarding()
37
37
$ tmpProviders = $ container ->getExpressionLanguageProviders ();
38
38
}));
39
39
40
- $ provider = $ this ->getMock ('Symfony \\Component \\ExpressionLanguage \\ExpressionFunctionProviderInterface ' );
40
+ $ provider = $ this ->getMockBuilder ('Symfony \\Component \\ExpressionLanguage \\ExpressionFunctionProviderInterface ' )-> getMock ( );
41
41
$ container = new ContainerBuilder (new ParameterBag ());
42
42
$ container ->registerExtension ($ extension );
43
43
$ container ->prependExtensionConfig ('foo ' , array ('bar ' => true ));
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ public function testAddGetCompilerPass()
254
254
$ builder = new ContainerBuilder ();
255
255
$ builder ->setResourceTracking (false );
256
256
$ builderCompilerPasses = $ builder ->getCompiler ()->getPassConfig ()->getPasses ();
257
- $ builder ->addCompilerPass ($ this ->getMock ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' ));
257
+ $ builder ->addCompilerPass ($ this ->getMockBuilder ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' )-> getMock ( ));
258
258
259
259
$ this ->assertCount (count ($ builder ->getCompiler ()->getPassConfig ()->getPasses ()) - 1 , $ builderCompilerPasses );
260
260
}
@@ -608,7 +608,7 @@ public function testExtension()
608
608
609
609
public function testRegisteredButNotLoadedExtension ()
610
610
{
611
- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
611
+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
612
612
$ extension ->expects ($ this ->once ())->method ('getAlias ' )->will ($ this ->returnValue ('project ' ));
613
613
$ extension ->expects ($ this ->never ())->method ('load ' );
614
614
@@ -620,7 +620,7 @@ public function testRegisteredButNotLoadedExtension()
620
620
621
621
public function testRegisteredAndLoadedExtension ()
622
622
{
623
- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
623
+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
624
624
$ extension ->expects ($ this ->exactly (2 ))->method ('getAlias ' )->will ($ this ->returnValue ('project ' ));
625
625
$ extension ->expects ($ this ->once ())->method ('load ' )->with (array (array ('foo ' => 'bar ' )));
626
626
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function testInstantiateProxy()
25
25
{
26
26
$ instantiator = new RealServiceInstantiator ();
27
27
$ instance = new \stdClass ();
28
- $ container = $ this ->getMock ('Symfony\Component\DependencyInjection\ContainerInterface ' );
28
+ $ container = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\ContainerInterface ' )-> getMock ( );
29
29
$ callback = function () use ($ instance ) {
30
30
return $ instance ;
31
31
};
You can’t perform that action at this time.
0 commit comments