2021-01-25 16:19:43 +00:00
|
|
|
<?php
|
|
|
|
|
|
2021-02-09 14:30:06 +00:00
|
|
|
namespace Illuminate\Tests\Testing;
|
2021-01-25 16:19:43 +00:00
|
|
|
|
|
|
|
|
use Illuminate\Testing\ParallelConsoleOutput;
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
use Symfony\Component\Console\Output\BufferedOutput;
|
|
|
|
|
|
|
|
|
|
class ParallelConsoleOutputTest extends TestCase
|
|
|
|
|
{
|
2025-09-02 01:45:37 +03:00
|
|
|
public function testWrite(): void
|
2021-01-25 16:19:43 +00:00
|
|
|
{
|
2021-03-19 01:05:33 +01:00
|
|
|
$original = new BufferedOutput;
|
2021-01-25 16:19:43 +00:00
|
|
|
$output = new ParallelConsoleOutput($original);
|
|
|
|
|
|
|
|
|
|
$output->write('Running phpunit in 12 processes with laravel/laravel.');
|
|
|
|
|
$this->assertEmpty($original->fetch());
|
|
|
|
|
|
|
|
|
|
$output->write('Configuration read from phpunit.xml.dist');
|
|
|
|
|
$this->assertEmpty($original->fetch());
|
|
|
|
|
|
|
|
|
|
$output->write('... 3/3 (100%)');
|
|
|
|
|
$this->assertSame('... 3/3 (100%)', $original->fetch());
|
|
|
|
|
}
|
|
|
|
|
}
|