@@ -26,11 +26,11 @@ public function testGetControllerService()
26
26
$ container ->expects ($ this ->once ())
27
27
->method ('has ' )
28
28
->with ('foo ' )
29
- ->will ( $ this -> returnValue ( true ) );
29
+ ->willReturn ( true );
30
30
$ container ->expects ($ this ->once ())
31
31
->method ('get ' )
32
32
->with ('foo ' )
33
- ->will ($ this -> returnValue ( $ this ) )
33
+ ->willReturn ($ this )
34
34
;
35
35
36
36
$ resolver = $ this ->createControllerResolver (null , $ container );
@@ -51,12 +51,12 @@ public function testGetControllerInvokableService()
51
51
$ container ->expects ($ this ->once ())
52
52
->method ('has ' )
53
53
->with ('foo ' )
54
- ->will ( $ this -> returnValue ( true ) )
54
+ ->willReturn ( true )
55
55
;
56
56
$ container ->expects ($ this ->once ())
57
57
->method ('get ' )
58
58
->with ('foo ' )
59
- ->will ( $ this -> returnValue ( $ invokableController) )
59
+ ->willReturn ( $ invokableController )
60
60
;
61
61
62
62
$ resolver = $ this ->createControllerResolver (null , $ container );
@@ -77,12 +77,12 @@ public function testGetControllerInvokableServiceWithClassNameAsName()
77
77
$ container ->expects ($ this ->once ())
78
78
->method ('has ' )
79
79
->with ($ className )
80
- ->will ( $ this -> returnValue ( true ) )
80
+ ->willReturn ( true )
81
81
;
82
82
$ container ->expects ($ this ->once ())
83
83
->method ('get ' )
84
84
->with ($ className )
85
- ->will ( $ this -> returnValue ( $ invokableController) )
85
+ ->willReturn ( $ invokableController )
86
86
;
87
87
88
88
$ resolver = $ this ->createControllerResolver (null , $ container );
@@ -100,7 +100,7 @@ public function testNonInstantiableController()
100
100
$ container ->expects ($ this ->once ())
101
101
->method ('has ' )
102
102
->with (NonInstantiableController::class)
103
- ->will ( $ this -> returnValue ( false ) )
103
+ ->willReturn ( false )
104
104
;
105
105
106
106
$ resolver = $ this ->createControllerResolver (null , $ container );
@@ -122,19 +122,19 @@ public function testNonConstructController()
122
122
$ container ->expects ($ this ->at (0 ))
123
123
->method ('has ' )
124
124
->with (ImpossibleConstructController::class)
125
- ->will ( $ this -> returnValue ( true ) )
125
+ ->willReturn ( true )
126
126
;
127
127
128
128
$ container ->expects ($ this ->at (1 ))
129
129
->method ('has ' )
130
130
->with (ImpossibleConstructController::class)
131
- ->will ( $ this -> returnValue ( false ) )
131
+ ->willReturn ( false )
132
132
;
133
133
134
134
$ container ->expects ($ this ->atLeastOnce ())
135
135
->method ('getRemovedIds ' )
136
136
->with ()
137
- ->will ( $ this -> returnValue ( [ImpossibleConstructController::class => true ]) )
137
+ ->willReturn ( [ImpossibleConstructController::class => true ])
138
138
;
139
139
140
140
$ resolver = $ this ->createControllerResolver (null , $ container );
@@ -162,12 +162,12 @@ public function testNonInstantiableControllerWithCorrespondingService()
162
162
$ container ->expects ($ this ->atLeastOnce ())
163
163
->method ('has ' )
164
164
->with (NonInstantiableController::class)
165
- ->will ( $ this -> returnValue ( true ) )
165
+ ->willReturn ( true )
166
166
;
167
167
$ container ->expects ($ this ->atLeastOnce ())
168
168
->method ('get ' )
169
169
->with (NonInstantiableController::class)
170
- ->will ( $ this -> returnValue ( $ service) )
170
+ ->willReturn ( $ service )
171
171
;
172
172
173
173
$ resolver = $ this ->createControllerResolver (null , $ container );
@@ -189,13 +189,13 @@ public function testExceptionWhenUsingRemovedControllerService()
189
189
$ container ->expects ($ this ->at (0 ))
190
190
->method ('has ' )
191
191
->with ('app.my_controller ' )
192
- ->will ( $ this -> returnValue ( false ) )
192
+ ->willReturn ( false )
193
193
;
194
194
195
195
$ container ->expects ($ this ->atLeastOnce ())
196
196
->method ('getRemovedIds ' )
197
197
->with ()
198
- ->will ( $ this -> returnValue ( ['app.my_controller ' => true ]) )
198
+ ->willReturn ( ['app.my_controller ' => true ])
199
199
;
200
200
201
201
$ resolver = $ this ->createControllerResolver (null , $ container );
@@ -215,12 +215,12 @@ public function testExceptionWhenUsingControllerWithoutAnInvokeMethod()
215
215
$ container ->expects ($ this ->once ())
216
216
->method ('has ' )
217
217
->with ('app.my_controller ' )
218
- ->will ( $ this -> returnValue ( true ) )
218
+ ->willReturn ( true )
219
219
;
220
220
$ container ->expects ($ this ->once ())
221
221
->method ('get ' )
222
222
->with ('app.my_controller ' )
223
- ->will ( $ this -> returnValue ( new ImpossibleConstructController ('toto ' , 'controller ' ) ))
223
+ ->willReturn ( new ImpossibleConstructController ('toto ' , 'controller ' ))
224
224
;
225
225
226
226
$ resolver = $ this ->createControllerResolver (null , $ container );
0 commit comments