From 8fc1961463e4ff549a7e949259dedee2a86bdf64 Mon Sep 17 00:00:00 2001 From: Clark Stuth Date: Wed, 19 Mar 2014 13:58:41 -0500 Subject: [PATCH] Fixing delete client workspace bug. --- src/Composer/Util/Perforce.php | 4 +++- tests/Composer/Test/Util/PerforceTest.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Composer/Util/Perforce.php b/src/Composer/Util/Perforce.php index 659cbfc67..f3e9d2023 100644 --- a/src/Composer/Util/Perforce.php +++ b/src/Composer/Util/Perforce.php @@ -111,7 +111,9 @@ class Perforce public function cleanupClientSpec() { $client = $this->getClient(); - $command = 'p4 client -d ' . $client; + $task = 'client -d ' . $client; + $useP4Client = false; + $command = $this->generateP4Command($task, $useP4Client); $this->executeCommand($command); $clientSpec = $this->getP4ClientSpec(); $fileSystem = $this->getFilesystem(); diff --git a/tests/Composer/Test/Util/PerforceTest.php b/tests/Composer/Test/Util/PerforceTest.php index 65857343b..06e3cce8b 100644 --- a/tests/Composer/Test/Util/PerforceTest.php +++ b/tests/Composer/Test/Util/PerforceTest.php @@ -686,7 +686,7 @@ class PerforceTest extends \PHPUnit_Framework_TestCase $this->perforce->setFilesystem($fs); $testClient = $this->perforce->getClient(); - $expectedCommand = 'p4 client -d ' . $testClient; + $expectedCommand = 'p4 -u ' . self::TEST_P4USER . ' -p ' . self::TEST_PORT . ' client -d ' . $testClient; $this->processExecutor->expects($this->once())->method('execute')->with($this->equalTo($expectedCommand)); $fs->expects($this->once())->method('remove')->with($this->perforce->getP4ClientSpec());