Skip to content

Commit 130d33c

Browse files
author
Bastian Schwarz
committed
Added Mockery trait so mocks are actually verified
1 parent c1308dd commit 130d33c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/task/media/PushTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@
2121
use de\codenamephp\deployer\base\hostCheck\iHostCheck;
2222
use de\codenamephp\deployer\base\task\media\Push;
2323
use de\codenamephp\deployer\base\transferable\iTransferable;
24+
use Mockery;
25+
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
2426
use PHPUnit\Framework\TestCase;
2527

2628
final class PushTest extends TestCase {
2729

30+
use MockeryPHPUnitIntegration;
31+
2832
private Push $sut;
2933

3034
protected function setUp() : void {
@@ -59,7 +63,7 @@ public function test__invoke() : void {
5963
$this->sut->hostCheck = $this->createMock(iHostCheck::class);
6064
$this->sut->hostCheck->expects(self::once())->method('check');
6165

62-
$this->sut->deployerFunctions = \Mockery::mock(iUpload::class);
66+
$this->sut->deployerFunctions = Mockery::mock(iUpload::class);
6367
$this->sut->deployerFunctions->allows('upload')->once()->ordered()->with('local1', 'remote1', ['config1']);
6468
$this->sut->deployerFunctions->allows('upload')->once()->ordered()->with('local2', 'remote2', ['config2']);
6569
$this->sut->deployerFunctions->allows('upload')->once()->ordered()->with('local3', 'remote3', ['config3']);

0 commit comments

Comments
 (0)