[PhpUnitBridge] silence some stderr outputs

This commit is contained in:
Gabriel Ostrolucký 2018-05-23 22:28:22 +02:00
parent ffd612c9a6
commit 87b3ad91d2
2 changed files with 3 additions and 3 deletions

View File

@ -31,11 +31,11 @@ class CoverageListenerTest extends TestCase
$dir = __DIR__.'/../Tests/Fixtures/coverage';
$phpunit = $_SERVER['argv'][0];
exec("$php $phpunit -c $dir/phpunit-without-listener.xml.dist $dir/tests/ --coverage-text", $output);
exec("$php $phpunit -c $dir/phpunit-without-listener.xml.dist $dir/tests/ --coverage-text 2> /dev/null", $output);
$output = implode("\n", $output);
$this->assertContains('FooCov', $output);
exec("$php $phpunit -c $dir/phpunit-with-listener.xml.dist $dir/tests/ --coverage-text", $output);
exec("$php $phpunit -c $dir/phpunit-with-listener.xml.dist $dir/tests/ --coverage-text 2> /dev/null", $output);
$output = implode("\n", $output);
$this->assertNotContains('FooCov', $output);
$this->assertContains("SutNotFoundTest::test\nCould not find the tested class.", $output);

View File

@ -47,7 +47,7 @@ if ('phpdbg' === PHP_SAPI) {
$PHP .= ' -qrr';
}
$COMPOSER = file_exists($COMPOSER = $oldPwd.'/composer.phar') || ($COMPOSER = rtrim('\\' === DIRECTORY_SEPARATOR ? preg_replace('/[\r\n].*/', '', `where.exe composer.phar`) : `which composer.phar`))
$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`))
? $PHP.' '.escapeshellarg($COMPOSER)
: 'composer';