Use writeError for xdebug warning and fix running test suite with xdebug
parent
d98b134dc3
commit
cf6cd83335
|
@ -112,7 +112,7 @@ class Application extends BaseApplication
|
|||
}
|
||||
|
||||
if (extension_loaded('xdebug')) {
|
||||
$io->write('<warning>You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug</warning>');
|
||||
$io->writeError('<warning>You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug</warning>');
|
||||
}
|
||||
|
||||
if (defined('COMPOSER_DEV_WARNING_TIME')) {
|
||||
|
|
|
@ -28,7 +28,14 @@ class ApplicationTest extends TestCase
|
|||
->method('getFirstArgument')
|
||||
->will($this->returnValue('list'));
|
||||
|
||||
$outputMock->expects($this->once())
|
||||
$index = 0;
|
||||
if (extension_loaded('xdebug')) {
|
||||
$outputMock->expects($this->at($index++))
|
||||
->method("write")
|
||||
->with($this->equalTo('<warning>You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug</warning>'));
|
||||
}
|
||||
|
||||
$outputMock->expects($this->at($index++))
|
||||
->method("write")
|
||||
->with($this->equalTo(sprintf('<warning>Warning: This development build of composer is over 60 days old. It is recommended to update it by running "%s self-update" to get the latest version.</warning>', $_SERVER['PHP_SELF'])));
|
||||
|
||||
|
|
Loading…
Reference in New Issue