deployer/tests/joy/EnvTest.php

26 lines
775 B
PHP
Raw Normal View History

2020-10-11 16:04:44 +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;
class EnvTest extends AbstractTest
{
const RECIPE = __DIR__ . '/recipe/env.php';
public function testOnce()
{
2021-10-12 22:47:44 +02:00
$this->dep(self::RECIPE, 'test');
2020-10-11 16:04:44 +02:00
$display = $this->tester->getDisplay();
self::assertEquals(0, $this->tester->getStatusCode(), $display);
self::assertStringContainsString('global=global', $display);
self::assertStringContainsString('local=local', $display);
2020-10-11 16:23:40 +02:00
self::assertStringContainsString('dotenv=Hello, world!', $display);
self::assertStringContainsString('dotenv=local', $display);
2020-10-11 16:04:44 +02:00
}
}