1
0
Fork 0
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:
Clark Stuth 2014-03-18 14:39:47 -05:00
parent 492539101c
commit c11105dd60
4 changed files with 52 additions and 4 deletions

View file

@ -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();
}
}