Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f8e21fd

Browse files
bug #27358 [PhpUnitBridge] silence some stderr outputs (ostrolucky)
This PR was merged into the 3.4 branch. Discussion ---------- [PhpUnitBridge] silence some stderr outputs | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Solves following issues ![obrazok](https://user-images.githubusercontent.com/496233/40449464-cc02bda2-5ed8-11e8-8a79-65c996ffc59d.png) and ![obrazok](https://user-images.githubusercontent.com/496233/40452080-eb57381a-5ee0-11e8-82b5-99e13b357f74.png) Commits ------- 87b3ad9 [PhpUnitBridge] silence some stderr outputs
2 parents 3d310ab + 87b3ad9 commit f8e21fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Bridge/PhpUnit/Tests/CoverageListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ public function test()
3131
$dir = __DIR__.'/../Tests/Fixtures/coverage';
3232
$phpunit = $_SERVER['argv'][0];
3333

34-
exec("$php $phpunit -c $dir/phpunit-without-listener.xml.dist $dir/tests/ --coverage-text", $output);
34+
exec("$php $phpunit -c $dir/phpunit-without-listener.xml.dist $dir/tests/ --coverage-text 2> /dev/null", $output);
3535
$output = implode("\n", $output);
3636
$this->assertContains('FooCov', $output);
3737

38-
exec("$php $phpunit -c $dir/phpunit-with-listener.xml.dist $dir/tests/ --coverage-text", $output);
38+
exec("$php $phpunit -c $dir/phpunit-with-listener.xml.dist $dir/tests/ --coverage-text 2> /dev/null", $output);
3939
$output = implode("\n", $output);
4040
$this->assertNotContains('FooCov', $output);
4141
$this->assertContains("SutNotFoundTest::test\nCould not find the tested class.", $output);

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if ('phpdbg' === PHP_SAPI) {
4747
$PHP .= ' -qrr';
4848
}
4949

50-
$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar`))
50+
$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar 2> /dev/null`))
5151
? $PHP.' '.escapeshellarg($COMPOSER)
5252
: 'composer';
5353

0 commit comments

Comments
 (0)