[PhpUnitBridge] silence some stderr outputs
This commit is contained in:
parent
ffd612c9a6
commit
87b3ad91d2
@ -31,11 +31,11 @@ class CoverageListenerTest extends TestCase
|
|||||||
$dir = __DIR__.'/../Tests/Fixtures/coverage';
|
$dir = __DIR__.'/../Tests/Fixtures/coverage';
|
||||||
$phpunit = $_SERVER['argv'][0];
|
$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);
|
$output = implode("\n", $output);
|
||||||
$this->assertContains('FooCov', $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);
|
$output = implode("\n", $output);
|
||||||
$this->assertNotContains('FooCov', $output);
|
$this->assertNotContains('FooCov', $output);
|
||||||
$this->assertContains("SutNotFoundTest::test\nCould not find the tested class.", $output);
|
$this->assertContains("SutNotFoundTest::test\nCould not find the tested class.", $output);
|
||||||
|
@ -47,7 +47,7 @@ if ('phpdbg' === PHP_SAPI) {
|
|||||||
$PHP .= ' -qrr';
|
$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)
|
? $PHP.' '.escapeshellarg($COMPOSER)
|
||||||
: 'composer';
|
: 'composer';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user