1717
1818namespace de \codenamephp \deployer \base \test \task \media ;
1919
20- use de \codenamephp \deployer \base \functions \All ;
2120use de \codenamephp \deployer \base \functions \iUpload ;
22- use de \codenamephp \deployer \base \hostCheck \DoNotRunOnProduction ;
2321use de \codenamephp \deployer \base \hostCheck \iHostCheck ;
2422use de \codenamephp \deployer \base \task \media \Push ;
2523use de \codenamephp \deployer \base \transferable \iTransferable ;
@@ -32,18 +30,23 @@ final class PushTest extends TestCase {
3230 protected function setUp () : void {
3331 parent ::setUp ();
3432
35- $ this ->sut = new Push ();
33+ $ deployerFunctions = $ this ->createMock (iUpload::class);
34+ $ hostCheck = $ this ->createMock (iHostCheck::class);
35+
36+ $ this ->sut = new Push ([], $ deployerFunctions , $ hostCheck );
3637 }
3738
3839 public function test__construct () : void {
3940 $ transferables1 = $ this ->createMock (iTransferable::class);
4041 $ transferables2 = $ this ->createMock (iTransferable::class);
42+ $ deployerFunctions = $ this ->createMock (iUpload::class);
43+ $ hostCheck = $ this ->createMock (iHostCheck::class);
4144
42- $ this ->sut = new Push ($ transferables1 , $ transferables2 );
45+ $ this ->sut = new Push ([ $ transferables1 , $ transferables2], $ deployerFunctions , $ hostCheck );
4346
4447 self ::assertSame ([$ transferables1 , $ transferables2 ], $ this ->sut ->getTransferables ());
45- self ::assertInstanceOf (All::class , $ this ->sut ->deployerFunctions );
46- self ::assertInstanceOf (DoNotRunOnProduction::class , $ this ->sut ->hostCheck );
48+ self ::assertSame ( $ deployerFunctions , $ this ->sut ->deployerFunctions );
49+ self ::assertSame ( $ hostCheck , $ this ->sut ->hostCheck );
4750 }
4851
4952 public function test__invoke () : void {
0 commit comments