Skip to content

Commit

Permalink
Silence stream_get_contents() warnings in TestCaseClass.tpl and TestC…
Browse files Browse the repository at this point in the history
…aseMethod.tpl
  • Loading branch information
sanmai authored and sebastianbergmann committed Oct 22, 2020
1 parent e2ac24d commit 0a488f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Util/PHP/Template/TestCaseClass.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function __phpunit_run_isolated_test()

ini_set('xdebug.scream', '0');
@rewind(STDOUT); /* @ as not every STDOUT target stream is rewindable */
if ($stdout = stream_get_contents(STDOUT)) {
if ($stdout = @stream_get_contents(STDOUT)) {
$output = $stdout . $output;
$streamMetaData = stream_get_meta_data(STDOUT);
if (!empty($streamMetaData['stream_type']) && 'STDIO' === $streamMetaData['stream_type']) {
Expand Down
2 changes: 1 addition & 1 deletion src/Util/PHP/Template/TestCaseMethod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function __phpunit_run_isolated_test()

ini_set('xdebug.scream', '0');
@rewind(STDOUT); /* @ as not every STDOUT target stream is rewindable */
if ($stdout = stream_get_contents(STDOUT)) {
if ($stdout = @stream_get_contents(STDOUT)) {
$output = $stdout . $output;
$streamMetaData = stream_get_meta_data(STDOUT);
if (!empty($streamMetaData['stream_type']) && 'STDIO' === $streamMetaData['stream_type']) {
Expand Down

0 comments on commit 0a488f2

Please sign in to comment.