mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Clear xdebug version if restart fails, fixes #5995
This commit is contained in:
parent
2782d37a15
commit
2b8ad7dc2a
2 changed files with 24 additions and 0 deletions
|
@ -113,6 +113,12 @@ class XdebugHandlerTest extends \PHPUnit_Framework_TestCase
|
|||
$xdebug = new XdebugHandlerMock($loaded);
|
||||
$xdebug->check();
|
||||
$this->assertEquals($xdebug->testVersion, getenv(XdebugHandlerMock::ENV_VERSION));
|
||||
|
||||
// Mimic successful restart
|
||||
$loaded = false;
|
||||
$xdebug = new XdebugHandlerMock($loaded);
|
||||
$xdebug->check();
|
||||
$this->assertEquals($xdebug->testVersion, getenv(XdebugHandlerMock::ENV_VERSION));
|
||||
}
|
||||
|
||||
public function testEnvVersionWhenNotLoaded()
|
||||
|
@ -124,6 +130,19 @@ class XdebugHandlerTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals(false, getenv(XdebugHandlerMock::ENV_VERSION));
|
||||
}
|
||||
|
||||
public function testEnvVersionWhenRestartFails()
|
||||
{
|
||||
$loaded = true;
|
||||
|
||||
$xdebug = new XdebugHandlerMock($loaded);
|
||||
$xdebug->check();
|
||||
|
||||
// Mimic failed restart
|
||||
$xdebug = new XdebugHandlerMock($loaded);
|
||||
$xdebug->check();
|
||||
$this->assertEquals(false, getenv(XdebugHandlerMock::ENV_VERSION));
|
||||
}
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
// Save current state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue