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

Skip to content

Commit 3314b39

Browse files
committed
[PhpUnitBridge] silence some stderror outputs
1 parent ffd612c commit 3314b39

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)