21 lines
435 B
PHP
21 lines
435 B
PHP
<?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
|
|
{
|
|
$command = 'vendor/bin/codecept run';
|
|
if ($suite) {
|
|
$command .= ' ' . escapeshellarg($suite);
|
|
}
|
|
|
|
passthru($command, $exitCode);
|
|
return $exitCode;
|
|
}
|
|
}
|