Add ProcessRunnerTest
This commit is contained in:
19
tests/Process/ProcessRunnerTest.php
Normal file
19
tests/Process/ProcessRunnerTest.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Scandalous\Tests\Process;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use Scandalous\Process\ProcessRunner;
|
||||||
|
|
||||||
|
final class ProcessRunnerTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testRunExecutesCommandAndReturnsOutput(): void
|
||||||
|
{
|
||||||
|
$runner = new ProcessRunner();
|
||||||
|
$output = $runner->run(['php', '-r', 'echo "hello world";']);
|
||||||
|
|
||||||
|
$this->assertSame('hello world', $output);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user