deployphp /
deployer
| 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 UpdateCodeTest extends AbstractTest |
||
|
0 ignored issues
–
show
Deprecated Code
introduced
by
Loading history...
|
|||
| 13 | { |
||
| 14 | public const RECIPE = __DIR__ . '/recipe/update_code.php'; |
||
| 15 | |||
| 16 | public function testDeployWithDifferentUpdateCodeTask() |
||
| 17 | { |
||
| 18 | $this->init(self::RECIPE); |
||
| 19 | $this->tester->run([ |
||
| 20 | 'deploy', |
||
| 21 | 'selector' => 'prod', |
||
| 22 | '-f' => self::RECIPE, |
||
| 23 | ], [ |
||
| 24 | 'verbosity' => Output::VERBOSITY_VERBOSE, |
||
| 25 | ]); |
||
| 26 | |||
| 27 | $display = $this->tester->getDisplay(); |
||
| 28 | $deployPath = $this->deployer->hosts->get('prod')->getDeployPath(); |
||
| 29 | |||
| 30 | self::assertEquals(0, $this->tester->getStatusCode(), $display); |
||
| 31 | self::assertFileExists($deployPath . '/current/uploaded.html'); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |