@@ 21-27 (lines=7) @@ | ||
18 | } |
|
19 | ||
20 | // tests |
|
21 | public function testBehatRun() |
|
22 | { |
|
23 | $behat = test::double('Robo\Task\Testing\Behat', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
|
24 | ||
25 | (new \Robo\Task\Testing\Behat('behat'))->run(); |
|
26 | $behat->verifyInvoked('executeCommand'); |
|
27 | } |
|
28 | ||
29 | public function testBehatCommand() |
|
30 | { |
@@ 54-60 (lines=7) @@ | ||
51 | $docker->verifyInvoked('executeCommand', ['docker exec cid pwd']); |
|
52 | } |
|
53 | ||
54 | public function testDockerPull() |
|
55 | { |
|
56 | $docker = test::double('Robo\Task\Docker\Pull', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
|
57 | ||
58 | (new \Robo\Task\Docker\Pull('image'))->run(); |
|
59 | $docker->verifyInvoked('executeCommand', ['docker pull image ']); |
|
60 | } |
|
61 | ||
62 | public function testDockerRemove() |
|
63 | { |
|
@@ 62-68 (lines=7) @@ | ||
59 | $docker->verifyInvoked('executeCommand', ['docker pull image ']); |
|
60 | } |
|
61 | ||
62 | public function testDockerRemove() |
|
63 | { |
|
64 | $docker = test::double('Robo\Task\Docker\Remove', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
|
65 | ||
66 | (new \Robo\Task\Docker\Remove('container'))->run(); |
|
67 | $docker->verifyInvoked('executeCommand', ['docker rm container ']); |
|
68 | } |
|
69 | ||
70 | public function testDockerRun() |
|
71 | { |
|
@@ 81-87 (lines=7) @@ | ||
78 | $docker->verifyInvoked('executeCommand', ['docker run -i --cidfile /tmp/docker_12345.cid cid pwd']); |
|
79 | } |
|
80 | ||
81 | public function testDockerStart() |
|
82 | { |
|
83 | $docker = test::double('Robo\Task\Docker\Start', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
|
84 | ||
85 | (new \Robo\Task\Docker\Start('cid'))->run(); |
|
86 | $docker->verifyInvoked('executeCommand', ['docker start cid']); |
|
87 | } |
|
88 | ||
89 | public function testDockerStop() |
|
90 | { |
|
@@ 89-95 (lines=7) @@ | ||
86 | $docker->verifyInvoked('executeCommand', ['docker start cid']); |
|
87 | } |
|
88 | ||
89 | public function testDockerStop() |
|
90 | { |
|
91 | $docker = test::double('Robo\Task\Docker\Stop', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
|
92 | ||
93 | (new \Robo\Task\Docker\Stop('cid'))->run(); |
|
94 | $docker->verifyInvoked('executeCommand', ['docker stop cid']); |
|
95 | } |
|
96 | } |
|
97 |