| @@ 70-79 (lines=10) @@ | ||
| 67 | $docker->verifyInvoked('executeCommand', ['docker rm container ']); |
|
| 68 | } |
|
| 69 | ||
| 70 | public function testDockerRun() |
|
| 71 | { |
|
| 72 | $docker = test::double('Robo\Task\Docker\Run', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger(), 'getUniqId' => '12345']); |
|
| 73 | ||
| 74 | (new \Robo\Task\Docker\Run('cid'))->tmpDir('/tmp')->run(); |
|
| 75 | $docker->verifyInvoked('executeCommand', ['docker run -i --cidfile /tmp/docker_12345.cid cid']); |
|
| 76 | ||
| 77 | (new \Robo\Task\Docker\Run('cid'))->tmpDir('/tmp')->exec('pwd')->run(); |
|
| 78 | $docker->verifyInvoked('executeCommand', ['docker run -i --cidfile /tmp/docker_12345.cid cid pwd']); |
|
| 79 | } |
|
| 80 | ||
| 81 | public function testDockerStart() |
|
| 82 | { |
|
| @@ 25-41 (lines=17) @@ | ||
| 22 | ]); |
|
| 23 | } |
|
| 24 | // tests |
|
| 25 | public function testComposerInstall() |
|
| 26 | { |
|
| 27 | $composer = test::double('Robo\Task\Composer\Install', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
|
| 28 | ||
| 29 | (new \Robo\Task\Composer\Install('composer'))->run(); |
|
| 30 | $composer->verifyInvoked('executeCommand', ['composer install --no-interaction']); |
|
| 31 | ||
| 32 | (new \Robo\Task\Composer\Install('composer')) |
|
| 33 | ->preferSource() |
|
| 34 | ->run(); |
|
| 35 | $composer->verifyInvoked('executeCommand', ['composer install --prefer-source --no-interaction']); |
|
| 36 | ||
| 37 | (new \Robo\Task\Composer\Install('composer')) |
|
| 38 | ->optimizeAutoloader() |
|
| 39 | ->run(); |
|
| 40 | $composer->verifyInvoked('executeCommand', ['composer install --optimize-autoloader --no-interaction']); |
|
| 41 | } |
|
| 42 | ||
| 43 | public function testComposerInstallAnsi() |
|
| 44 | { |
|