@@ -24,11 +24,8 @@ public function testThatCacheWarmersAreProcessedInPriorityOrder()
24
24
'my_cache_warmer_service3 ' => array (),
25
25
);
26
26
27
- $ definition = $ this ->getMock ('Symfony\Component\DependencyInjection\Definition ' );
28
- $ container = $ this ->getMock (
29
- 'Symfony\Component\DependencyInjection\ContainerBuilder ' ,
30
- array ('findTaggedServiceIds ' , 'getDefinition ' , 'hasDefinition ' )
31
- );
27
+ $ definition = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\Definition ' )->getMock ();
28
+ $ container = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\ContainerBuilder ' )->setMethods (array ('findTaggedServiceIds ' , 'getDefinition ' , 'hasDefinition ' ))->getMock ();
32
29
33
30
$ container ->expects ($ this ->atLeastOnce ())
34
31
->method ('findTaggedServiceIds ' )
@@ -56,11 +53,8 @@ public function testThatCacheWarmersAreProcessedInPriorityOrder()
56
53
57
54
public function testThatCompilerPassIsIgnoredIfThereIsNoCacheWarmerDefinition ()
58
55
{
59
- $ definition = $ this ->getMock ('Symfony\Component\DependencyInjection\Definition ' );
60
- $ container = $ this ->getMock (
61
- 'Symfony\Component\DependencyInjection\ContainerBuilder ' ,
62
- array ('hasDefinition ' , 'findTaggedServiceIds ' , 'getDefinition ' )
63
- );
56
+ $ definition = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\Definition ' )->getMock ();
57
+ $ container = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\ContainerBuilder ' )->setMethods (array ('hasDefinition ' , 'findTaggedServiceIds ' , 'getDefinition ' ))->getMock ();
64
58
65
59
$ container ->expects ($ this ->never ())->method ('findTaggedServiceIds ' );
66
60
$ container ->expects ($ this ->never ())->method ('getDefinition ' );
@@ -76,11 +70,8 @@ public function testThatCompilerPassIsIgnoredIfThereIsNoCacheWarmerDefinition()
76
70
77
71
public function testThatCacheWarmersMightBeNotDefined ()
78
72
{
79
- $ definition = $ this ->getMock ('Symfony\Component\DependencyInjection\Definition ' );
80
- $ container = $ this ->getMock (
81
- 'Symfony\Component\DependencyInjection\ContainerBuilder ' ,
82
- array ('hasDefinition ' , 'findTaggedServiceIds ' , 'getDefinition ' )
83
- );
73
+ $ definition = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\Definition ' )->getMock ();
74
+ $ container = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\ContainerBuilder ' )->setMethods (array ('hasDefinition ' , 'findTaggedServiceIds ' , 'getDefinition ' ))->getMock ();
84
75
85
76
$ container ->expects ($ this ->atLeastOnce ())
86
77
->method ('findTaggedServiceIds ' )
0 commit comments