Skip to content

Commit 059a362

Browse files
committed
Replace deprecated at() Mocks
1 parent a8ec7b4 commit 059a362

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

tests/PromiseTest/NotifyTestTrait.php

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,10 @@ public function notifyShouldAllowResolveAfterProgress()
235235
$adapter = $this->getPromiseTestAdapter();
236236

237237
$mock = $this->createCallableMock();
238-
$mock
239-
->expects($this->at(0))
240-
->method('__invoke')
241-
->with($this->identicalTo(1));
242-
$mock
243-
->expects($this->at(1))
244-
->method('__invoke')
245-
->with($this->identicalTo(2));
238+
$mock->expects($this->exactly(2))->method('__invoke')->withConsecutive(
239+
array($this->identicalTo(1)),
240+
array($this->identicalTo(2))
241+
);
246242

247243
$adapter->promise()
248244
->then(
@@ -261,14 +257,10 @@ public function notifyShouldAllowRejectAfterProgress()
261257
$adapter = $this->getPromiseTestAdapter();
262258

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

273265
$adapter->promise()
274266
->then(

0 commit comments

Comments
 (0)