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 SelectTest extends AbstractTest |
||
|
0 ignored issues
–
show
Deprecated Code
introduced
by
Loading history...
|
|||
| 13 | { |
||
| 14 | public const RECIPE = __DIR__ . '/recipe/select.php'; |
||
| 15 | |||
| 16 | public function testSelect() |
||
| 17 | { |
||
| 18 | $this->init(self::RECIPE); |
||
| 19 | $this->tester->run([ |
||
| 20 | 'test', |
||
| 21 | '-f' => self::RECIPE, |
||
| 22 | 'selector' => 'prod', |
||
| 23 | ], [ |
||
| 24 | 'verbosity' => Output::VERBOSITY_DEBUG, |
||
| 25 | ]); |
||
| 26 | |||
| 27 | $display = $this->tester->getDisplay(); |
||
| 28 | self::assertEquals(0, $this->tester->getStatusCode(), $display); |
||
| 29 | self::assertStringNotContainsString('executing on prod', $display); |
||
| 30 | self::assertStringContainsString('executing on beta', $display); |
||
| 31 | self::assertStringContainsString('executing on dev', $display); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |