Skip to content

Commit

Permalink
Merge pull request #6499 from ping-yee/test-TestCaseTest
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner authored Sep 10, 2022
2 parents 3d07204 + 8030ae0 commit e1dbce0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/system/Test/TestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ final class TestCaseTest extends CIUnitTestCase
*/
private $stream_filter;

protected function setUp(): void
{
parent::setUp();

// Reset CLI::$lastWrite
CLI::print();
}

public function testGetPrivatePropertyWithObject()
{
$obj = new __TestForReflectionHelper();
Expand Down Expand Up @@ -56,7 +64,7 @@ public function testStreamFilter()
CITestStreamFilter::$buffer = '';
$this->stream_filter = stream_filter_append(STDOUT, 'CITestStreamFilter');
CLI::write('first.');
$expected = "first.\n";
$expected = "\nfirst.\n";
$this->assertSame($expected, CITestStreamFilter::$buffer);
stream_filter_remove($this->stream_filter);
}
Expand Down

0 comments on commit e1dbce0

Please sign in to comment.