Skip to content

Commit fe659c2

Browse files
committed
update depricated will(->returnValue()) to willReturn()
1 parent 7047b79 commit fe659c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

create_framework/unit_testing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ We are now ready to write our first test::
114114
$matcher
115115
->expects($this->once())
116116
->method('getContext')
117-
->will($this->returnValue($this->createMock(Routing\RequestContext::class)))
117+
->willReturn($this->createMock(Routing\RequestContext::class))
118118
;
119119
$controllerResolver = $this->createMock(ControllerResolverInterface::class);
120120
$argumentResolver = $this->createMock(ArgumentResolverInterface::class);
@@ -169,16 +169,16 @@ Response::
169169
$matcher
170170
->expects($this->once())
171171
->method('match')
172-
->will($this->returnValue([
172+
->willReturn([
173173
'_route' => 'is_leap_year/{year}',
174174
'year' => '2000',
175175
'_controller' => [new LeapYearController(), 'index'],
176-
]))
176+
])
177177
;
178178
$matcher
179179
->expects($this->once())
180180
->method('getContext')
181-
->will($this->returnValue($this->createMock(Routing\RequestContext::class)))
181+
->willReturn($this->createMock(Routing\RequestContext::class))
182182
;
183183
$controllerResolver = new ControllerResolver();
184184
$argumentResolver = new ArgumentResolver();

0 commit comments

Comments
 (0)