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 @@ -249,7 +249,7 @@ public function testAddGetCompilerPass()
249
249
$ builder = new ContainerBuilder ();
250
250
$ builder ->setResourceTracking (false );
251
251
$ builderCompilerPasses = $ builder ->getCompiler ()->getPassConfig ()->getPasses ();
252
- $ builder ->addCompilerPass ($ this ->getMock ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' ));
252
+ $ builder ->addCompilerPass ($ this ->getMockBuilder ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' )-> getMock ( ));
253
253
254
254
$ this ->assertCount (count ($ builder ->getCompiler ()->getPassConfig ()->getPasses ()) - 1 , $ builderCompilerPasses );
255
255
}
@@ -620,7 +620,7 @@ public function testExtension()
620
620
621
621
public function testRegisteredButNotLoadedExtension ()
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 ->once ())->method ('getAlias ' )->will ($ this ->returnValue ('project ' ));
625
625
$ extension ->expects ($ this ->never ())->method ('load ' );
626
626
@@ -632,7 +632,7 @@ public function testRegisteredButNotLoadedExtension()
632
632
633
633
public function testRegisteredAndLoadedExtension ()
634
634
{
635
- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
635
+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
636
636
$ extension ->expects ($ this ->exactly (2 ))->method ('getAlias ' )->will ($ this ->returnValue ('project ' ));
637
637
$ extension ->expects ($ this ->once ())->method ('load ' )->with (array (array ('foo ' => 'bar ' )));
638
638
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