deployer/tests/joy/SelectTest.php
Anton Medvedev 387b4c1d51
Update composer dependencies (#2453)
As well rename test dir to tests, as Pest does not support dir without s on the end.
Also, remove PHP requirement from composer.json as we already have check-in bin/dep and it's better to have the check only in one place (now they already out of sync).
2021-03-12 13:56:16 +03:00

34 lines
956 B
PHP

<?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);
}
}