| @@ 80-86 (lines=7) @@ | ||
| 77 | * |
|
| 78 | * @expectedException \DockerCompose\Exception\ComposeFileNotFoundException |
|
| 79 | */ |
|
| 80 | public function testRemoveThrowComposeFileNotFound() |
|
| 81 | { |
|
| 82 | $error = 'Can\'t find a suitable configuration file in this directory or any parent. Are you in the right directory?\n'; |
|
| 83 | $error .= 'Supported filenames: docker-compose.yml, docker-compose.yaml, fig.yml, fig.yaml'; |
|
| 84 | $this->mockedManager->method('execute')->willReturn(array('output' => $error, 'code' => 1)); |
|
| 85 | $this->mockedManager->remove(); |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * Test remove with DockerHostConnexionErrorException |
|
| @@ 93-99 (lines=7) @@ | ||
| 90 | * |
|
| 91 | * @expectedException \DockerCompose\Exception\DockerHostConnexionErrorException |
|
| 92 | */ |
|
| 93 | public function testRemoveThrowDockerHostConnexionErrorException() |
|
| 94 | { |
|
| 95 | $error = 'Couldn\'t connect to Docker daemon at http+docker://localunixsocket - is it running?\n'; |
|
| 96 | $error .= 'If it\'s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.'; |
|
| 97 | $this->mockedManager->method('execute')->willReturn(array('output' => $error, 'code' => 1)); |
|
| 98 | $this->mockedManager->remove(); |
|
| 99 | } |
|
| 100 | ||
| 101 | /** |
|
| 102 | * Test remove with DockerInstallationMissingException |
|
| @@ 65-71 (lines=7) @@ | ||
| 62 | * |
|
| 63 | * @expectedException \DockerCompose\Exception\ComposeFileNotFoundException |
|
| 64 | */ |
|
| 65 | public function testStartThrowComposeFileNotFound() |
|
| 66 | { |
|
| 67 | $error = 'Can\'t find a suitable configuration file in this directory or any parent. Are you in the right directory?\n'; |
|
| 68 | $error .= 'Supported filenames: docker-compose.yml, docker-compose.yaml, fig.yml, fig.yaml'; |
|
| 69 | $this->mockedManager->method('execute')->willReturn(array('output' => $error, 'code' => 1)); |
|
| 70 | $this->mockedManager->start(); |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * Test start with DockerHostConnexionErrorException |
|
| @@ 78-84 (lines=7) @@ | ||
| 75 | * |
|
| 76 | * @expectedException \DockerCompose\Exception\DockerHostConnexionErrorException |
|
| 77 | */ |
|
| 78 | public function testStartThrowDockerHostConnexionErrorException() |
|
| 79 | { |
|
| 80 | $error = 'Couldn\'t connect to Docker daemon at http+docker://localunixsocket - is it running?\n'; |
|
| 81 | $error .= 'If it\'s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.'; |
|
| 82 | $this->mockedManager->method('execute')->willReturn(array('output' => $error, 'code' => 1)); |
|
| 83 | $this->mockedManager->start(); |
|
| 84 | } |
|
| 85 | ||
| 86 | /** |
|
| 87 | * Test start with DockerInstallationMissingException |
|
| @@ 53-59 (lines=7) @@ | ||
| 50 | * |
|
| 51 | * @expectedException \DockerCompose\Exception\ComposeFileNotFoundException |
|
| 52 | */ |
|
| 53 | public function testStopThrowComposeFileNotFound() |
|
| 54 | { |
|
| 55 | $error = 'Can\'t find a suitable configuration file in this directory or any parent. Are you in the right directory?\n'; |
|
| 56 | $error .= 'Supported filenames: docker-compose.yml, docker-compose.yaml, fig.yml, fig.yaml'; |
|
| 57 | $this->mockedManager->method('execute')->willReturn(array('output' => $error, 'code' => 1)); |
|
| 58 | $this->mockedManager->stop(); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * Test stop with DockerHostConnexionErrorException |
|
| @@ 66-72 (lines=7) @@ | ||
| 63 | * |
|
| 64 | * @expectedException \DockerCompose\Exception\DockerHostConnexionErrorException |
|
| 65 | */ |
|
| 66 | public function testStopThrowDockerHostConnexionErrorException() |
|
| 67 | { |
|
| 68 | $error = 'Couldn\'t connect to Docker daemon at http+docker://localunixsocket - is it running?\n'; |
|
| 69 | $error .= 'If it\'s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.'; |
|
| 70 | $this->mockedManager->method('execute')->willReturn(array('output' => $error, 'code' => 1)); |
|
| 71 | $this->mockedManager->stop(); |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * Test stop with DockerInstallationMissingException |
|