deployer/tests/e2e/LaravelBoilerplateE2ETest.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

39 lines
1008 B
PHP

<?php declare(strict_types=1);
namespace e2e;
class LaravelBoilerplateE2ETest extends AbstractE2ETest
{
private const RECIPE = __DIR__ . '/recipe/laravel-boilerplate.php';
public function testDeployLaravelBoilerplate(): void
{
$this->init(self::RECIPE);
$this->tester->run([
'deploy',
'-f' => self::RECIPE,
'selector' => 'all',
]);
$display = trim($this->tester->getDisplay());
self::assertEquals(0, $this->tester->getStatusCode(), $display);
$siteContent = file_get_contents('http://server.test');
$expectedSiteContent = "Build v8.";
self::assertStringContainsString($expectedSiteContent, $siteContent);
}
protected function tearDown(): void
{
parent::tearDown();
if ($this->tester) {
$this->tester->run([
'deploy:unlock',
'-f' => self::RECIPE,
'selector' => 'all',
]);
}
}
}