@@ -31,13 +31,13 @@ public function testThrowsException()
31
31
$ autowireException = new AutowiringFailedException ('foo_service_id ' , 'An autowiring exception message ' );
32
32
$ autowirePass ->expects ($ this ->any ())
33
33
->method ('getAutowiringExceptions ' )
34
- ->will ( $ this -> returnValue ( [$ autowireException ]) );
34
+ ->willReturn ( [$ autowireException ]);
35
35
36
36
$ inlinePass = $ this ->getMockBuilder (InlineServiceDefinitionsPass::class)
37
37
->getMock ();
38
38
$ inlinePass ->expects ($ this ->any ())
39
39
->method ('getInlinedServiceIds ' )
40
- ->will ( $ this -> returnValue ([]) );
40
+ ->willReturn ([] );
41
41
42
42
$ container = new ContainerBuilder ();
43
43
$ container ->register ('foo_service_id ' );
@@ -60,18 +60,18 @@ public function testThrowExceptionIfServiceInlined()
60
60
$ autowireException = new AutowiringFailedException ('a_service ' , 'An autowiring exception message ' );
61
61
$ autowirePass ->expects ($ this ->any ())
62
62
->method ('getAutowiringExceptions ' )
63
- ->will ( $ this -> returnValue ( [$ autowireException ]) );
63
+ ->willReturn ( [$ autowireException ]);
64
64
65
65
$ inlinePass = $ this ->getMockBuilder (InlineServiceDefinitionsPass::class)
66
66
->getMock ();
67
67
$ inlinePass ->expects ($ this ->any ())
68
68
->method ('getInlinedServiceIds ' )
69
- ->will ( $ this -> returnValue ([
69
+ ->willReturn ([
70
70
// a_service inlined into b_service
71
71
'a_service ' => ['b_service ' ],
72
72
// b_service inlined into c_service
73
73
'b_service ' => ['c_service ' ],
74
- ])) ;
74
+ ]);
75
75
76
76
$ container = new ContainerBuilder ();
77
77
// ONLY register c_service in the final container
@@ -95,18 +95,18 @@ public function testDoNotThrowExceptionIfServiceInlinedButRemoved()
95
95
$ autowireException = new AutowiringFailedException ('a_service ' , 'An autowiring exception message ' );
96
96
$ autowirePass ->expects ($ this ->any ())
97
97
->method ('getAutowiringExceptions ' )
98
- ->will ( $ this -> returnValue ( [$ autowireException ]) );
98
+ ->willReturn ( [$ autowireException ]);
99
99
100
100
$ inlinePass = $ this ->getMockBuilder (InlineServiceDefinitionsPass::class)
101
101
->getMock ();
102
102
$ inlinePass ->expects ($ this ->any ())
103
103
->method ('getInlinedServiceIds ' )
104
- ->will ( $ this -> returnValue ([
104
+ ->willReturn ([
105
105
// a_service inlined into b_service
106
106
'a_service ' => ['b_service ' ],
107
107
// b_service inlined into c_service
108
108
'b_service ' => ['c_service ' ],
109
- ])) ;
109
+ ]);
110
110
111
111
// do NOT register c_service in the container
112
112
$ container = new ContainerBuilder ();
@@ -126,13 +126,13 @@ public function testNoExceptionIfServiceRemoved()
126
126
$ autowireException = new AutowiringFailedException ('non_existent_service ' );
127
127
$ autowirePass ->expects ($ this ->any ())
128
128
->method ('getAutowiringExceptions ' )
129
- ->will ( $ this -> returnValue ( [$ autowireException ]) );
129
+ ->willReturn ( [$ autowireException ]);
130
130
131
131
$ inlinePass = $ this ->getMockBuilder (InlineServiceDefinitionsPass::class)
132
132
->getMock ();
133
133
$ inlinePass ->expects ($ this ->any ())
134
134
->method ('getInlinedServiceIds ' )
135
- ->will ( $ this -> returnValue ([]) );
135
+ ->willReturn ([] );
136
136
137
137
$ container = new ContainerBuilder ();
138
138
0 commit comments