Skip to content

Commit c2278a0

Browse files
Add tests
1 parent 3dd51c9 commit c2278a0

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

tests/unit/Util/PHP/ResultTest.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <[email protected]>
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 PHPUnit\Util\PHP;
11+
12+
use PHPUnit\Framework\Attributes\CoversClass;
13+
use PHPUnit\Framework\Attributes\Small;
14+
use PHPUnit\Framework\TestCase;
15+
16+
#[CoversClass(Result::class)]
17+
#[Small]
18+
final class ResultTest extends TestCase
19+
{
20+
public function testHasOutputFromStdout(): void
21+
{
22+
$this->assertSame('stdout', $this->fixture()->stdout());
23+
}
24+
25+
public function testHasOutputFromStderr(): void
26+
{
27+
$this->assertSame('stderr', $this->fixture()->stderr());
28+
}
29+
30+
private function fixture(): Result
31+
{
32+
return new Result('stdout', 'stderr');
33+
}
34+
}

0 commit comments

Comments
 (0)