Browse Source

Fixing delete client workspace bug.

Clark Stuth 11 years ago
parent
commit
8fc1961463
2 changed files with 4 additions and 2 deletions
  1. 3 1
      src/Composer/Util/Perforce.php
  2. 1 1
      tests/Composer/Test/Util/PerforceTest.php

+ 3 - 1
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();

+ 1 - 1
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());