1 | <?php |
||
2 | /* (c) Anton Medvedev <[email protected]> |
||
3 | * |
||
4 | * For the full copyright and license information, please view the LICENSE |
||
5 | * file that was distributed with this source code. |
||
6 | */ |
||
7 | |||
8 | namespace Deployer; |
||
9 | |||
10 | use Symfony\Component\Console\Output\Output; |
||
11 | |||
12 | class CurrentPathTest extends AbstractTest |
||
0 ignored issues
–
show
Deprecated Code
introduced
by
![]() |
|||
13 | { |
||
14 | public const RECIPE = __DIR__ . '/recipe/deploy.php'; |
||
15 | |||
16 | public function testDeployWithDifferentCurrentPath() |
||
17 | { |
||
18 | $currentPath = __TEMP_DIR__ . '/prod/public_html'; |
||
19 | |||
20 | $this->init(self::RECIPE); |
||
21 | $this->tester->run([ |
||
22 | 'deploy', |
||
23 | 'selector' => 'prod', |
||
24 | '-f' => self::RECIPE, |
||
25 | '-o' => ['current_path=' . $currentPath], |
||
26 | ], [ |
||
27 | 'verbosity' => Output::VERBOSITY_VERBOSE, |
||
28 | ]); |
||
29 | |||
30 | $display = $this->tester->getDisplay(); |
||
31 | self::assertEquals(0, $this->tester->getStatusCode(), $display); |
||
32 | self::assertFileExists($currentPath . '/README.md'); |
||
33 | self::assertFileExists($currentPath . '/config/test.yaml'); |
||
34 | } |
||
35 | } |
||
36 |