1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Use writeError for xdebug warning and fix running test suite with xdebug

This commit is contained in:
Jordi Boggiano 2015-11-19 17:36:52 +00:00
parent d98b134dc3
commit cf6cd83335
2 changed files with 15 additions and 8 deletions

View file

@ -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'])));