Framework/src/Testing/CodeceptionRunner.php

21 lines
435 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace Phred\Testing;
use Phred\Testing\Contracts\TestRunnerInterface;
final class CodeceptionRunner implements TestRunnerInterface
{
public function run(?string $suite = null): int
{
2026-01-06 17:02:05 +00:00
$command = 'vendor/bin/codecept run';
if ($suite) {
$command .= ' ' . escapeshellarg($suite);
}
passthru($command, $exitCode);
return $exitCode;
}
}