Skip to content

Commit aca8ea9

Browse files
committed
Replace deprecated at() Mocks
1 parent 20246a3 commit aca8ea9

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

tests/React/Promise/DeferredProgressTest.php

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,10 @@ public function shouldAllowResolveAfterProgress()
259259
$d = new Deferred();
260260

261261
$mock = $this->createCallableMock();
262-
$mock
263-
->expects($this->at(0))
264-
->method('__invoke')
265-
->with($this->identicalTo(1));
266-
$mock
267-
->expects($this->at(1))
268-
->method('__invoke')
269-
->with($this->identicalTo(2));
262+
$mock->expects($this->exactly(2))->method('__invoke')->withConsecutive(
263+
array($this->identicalTo(1)),
264+
array($this->identicalTo(2))
265+
);
270266

271267
$d
272268
->promise()
@@ -290,14 +286,10 @@ public function shouldAllowRejectAfterProgress()
290286
$d = new Deferred();
291287

292288
$mock = $this->createCallableMock();
293-
$mock
294-
->expects($this->at(0))
295-
->method('__invoke')
296-
->with($this->identicalTo(1));
297-
$mock
298-
->expects($this->at(1))
299-
->method('__invoke')
300-
->with($this->identicalTo(2));
289+
$mock->expects($this->exactly(2))->method('__invoke')->withConsecutive(
290+
array($this->identicalTo(1)),
291+
array($this->identicalTo(2))
292+
);
301293

302294
$d
303295
->promise()

0 commit comments

Comments
 (0)