mirror of
https://github.com/doctrine/doctrine-website.git
synced 2026-03-24 06:42:12 +01:00
34 lines
678 B
PHP
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());
|
|
}
|
|
}
|