mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Fixing bug not cleaning up workspaces.
This commit is contained in:
parent
492539101c
commit
c11105dd60
4 changed files with 52 additions and 4 deletions
|
@ -93,7 +93,7 @@ class PerforceDriverTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
protected function getMockPerforce()
|
||||
{
|
||||
$methods = array('p4login', 'checkStream', 'writeP4ClientSpec', 'connectClient', 'getComposerInformation');
|
||||
$methods = array('p4login', 'checkStream', 'writeP4ClientSpec', 'connectClient', 'getComposerInformation', 'cleanupClientSpec');
|
||||
return $this->getMockBuilder('Composer\Util\Perforce', $methods)->disableOriginalConstructor()->getMock();
|
||||
}
|
||||
|
||||
|
@ -159,4 +159,13 @@ class PerforceDriverTest extends \PHPUnit_Framework_TestCase
|
|||
$this->expectOutputString('');
|
||||
$this->assertFalse(PerforceDriver::supports($this->io, $this->config, 'existing.url'));
|
||||
}
|
||||
|
||||
public function testCleanup()
|
||||
{
|
||||
$this->perforce->expects($this->once())->method('cleanupClientSpec');
|
||||
$this->driver->setPerforce($this->perforce);
|
||||
$this->driver->cleanup();
|
||||
$this->assertNull($this->driver->getPerforce());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue