Skip to content

Commit 78cc9e6

Browse files
committed
Test possible stream conflicts
1 parent c1ed574 commit 78cc9e6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tests/Streams/FilterStreamTest.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/*
3+
* This file is part of Aplus Framework CLI Library.
4+
*
5+
* (c) Natan Felles <natanfelles@gmail.com>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace Tests\CLI\Streams;
11+
12+
use Framework\CLI\Streams\Stderr;
13+
use Framework\CLI\Streams\Stdout;
14+
use PHPUnit\Framework\TestCase;
15+
16+
/**
17+
* @runTestsInSeparateProcesses
18+
*/
19+
final class FilterStreamTest extends TestCase
20+
{
21+
public function testConflicts() : void
22+
{
23+
Stderr::init();
24+
Stdout::init();
25+
\fwrite(\STDERR, 'err');
26+
\fwrite(\STDOUT, 'out');
27+
self::assertSame('err', Stderr::getContents());
28+
self::assertSame('out', Stdout::getContents());
29+
}
30+
}

0 commit comments

Comments
 (0)