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
-------
87b3ad91d2
[PhpUnitBridge] silence some stderr outputs
This commit is contained in:
commit
f8e21fd67b
@ -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);
|
||||
|
@ -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';
|
||||
|
||||
|
Reference in New Issue
Block a user