deployer/tests/legacy/SelectTest.php

34 lines
956 B
PHP
Raw Normal View History

2020-10-10 23:13:43 +02:00
<?php
/* (c) Anton Medvedev <anton@medv.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Deployer;
use Symfony\Component\Console\Output\Output;
class SelectTest extends AbstractTest
{
const RECIPE = __DIR__ . '/recipe/select.php';
public function testSelect()
{
$this->init(self::RECIPE);
$this->tester->run([
'test',
'-f' => self::RECIPE,
'selector' => 'prod'
], [
'verbosity' => Output::VERBOSITY_DEBUG,
]);
$display = $this->tester->getDisplay();
self::assertEquals(0, $this->tester->getStatusCode(), $display);
self::assertStringNotContainsString('executing on prod', $display);
self::assertStringContainsString('executing on beta', $display);
self::assertStringContainsString('executing on dev', $display);
}
}