mirror of
https://github.com/composer/composer
synced 2025-05-10 09:02:59 +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
|
@ -679,4 +679,19 @@ class PerforceTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
$this->perforce->setStream('//depot/branch');
|
||||
}
|
||||
|
||||
public function testCleanupClientSpecShouldDeleteClient()
|
||||
{
|
||||
$fs = $this->getMock('Composer\Util\Filesystem');
|
||||
$this->perforce->setFilesystem($fs);
|
||||
|
||||
$testClient = $this->perforce->getClient();
|
||||
$expectedCommand = 'p4 client -d ' . $testClient;
|
||||
$this->processExecutor->expects($this->once())->method('execute')->with($this->equalTo($expectedCommand));
|
||||
|
||||
$fs->expects($this->once())->method('remove')->with($this->perforce->getP4ClientSpec());
|
||||
|
||||
$this->perforce->cleanupClientSpec();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue