1
0
Fork 0
get-installer-bootstrap/tests/Docker/EntrypointTest.php
2026-05-05 11:46:50 +02:00

23 lines
738 B
PHP

<?php
namespace App\Tests\Docker;
use PHPUnit\Framework\TestCase;
final class EntrypointTest extends TestCase
{
public function testBootConsoleCommandsRunAsRuntimeUser(): void
{
$entrypoint = file_get_contents(__DIR__.'/../../docker/entrypoint.sh');
self::assertIsString($entrypoint);
self::assertStringContainsString(
"su -m www-data -s /bin/sh -c 'cd /app && php /app/bin/console cache:clear --no-warmup --no-interaction'",
$entrypoint
);
self::assertStringContainsString(
"su -m www-data -s /bin/sh -c 'cd /app && php /app/bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration'",
$entrypoint
);
}
}