Skip to content

Commit 51a3fa6

Browse files
author
Bastian Schwarz
committed
Replaced withConsecutive with ordered mockery call
1 parent 5380443 commit 51a3fa6

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

test/task/media/PushTest.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,10 @@ public function test__invoke() : void {
5959
$this->sut->hostCheck = $this->createMock(iHostCheck::class);
6060
$this->sut->hostCheck->expects(self::once())->method('check');
6161

62-
$this->sut->deployerFunctions = $this->createMock(iUpload::class);
63-
$this->sut->deployerFunctions
64-
->expects(self::exactly(3))
65-
->method('upload')
66-
->withConsecutive(
67-
['local1', 'remote1', ['config1']],
68-
['local2', 'remote2', ['config2']],
69-
['local3', 'remote3', ['config3']],
70-
);
62+
$this->sut->deployerFunctions = \Mockery::mock(iUpload::class);
63+
$this->sut->deployerFunctions->allows('upload')->once()->ordered()->with('local1', 'remote1', ['config1']);
64+
$this->sut->deployerFunctions->allows('upload')->once()->ordered()->with('local2', 'remote2', ['config2']);
65+
$this->sut->deployerFunctions->allows('upload')->once()->ordered()->with('local3', 'remote3', ['config3']);
7166

7267
$this->sut->__invoke();
7368
}

0 commit comments

Comments
 (0)