Files
archived-doctrine-website/tests/ProcessFactoryTest.php
2023-08-23 21:03:31 +02:00

34 lines
678 B
PHP

<?php
declare(strict_types=1);
namespace Doctrine\Website\Tests;
use Doctrine\Website\ProcessFactory;
class ProcessFactoryTest extends TestCase
{
private ProcessFactory $processFactory;
protected function setUp(): void
{
$this->processFactory = new ProcessFactory();
}
public function testCreate(): void
{
$command = 'ls -la';
$process = $this->processFactory->create($command);
self::assertSame($command, $process->getCommandLine());
}
public function testRun(): void
{
$process = $this->processFactory->run('echo "test"');
self::assertSame("test\n", $process->getOutput());
}
}