1
0
Fork 0

Fixed unit test explicitly depending on erroneous method invocation.

pull/4972/head
Niels Keurentjes 2016-02-27 23:42:55 +01:00
parent f794ee7870
commit 3a66d1b9bb
1 changed files with 3 additions and 2 deletions

View File

@ -25,6 +25,7 @@ use Composer\Util\Filesystem;
class PerforceDownloaderTest extends TestCase
{
protected $config;
/** @var PerforceDownloader */
protected $downloader;
protected $io;
protected $package;
@ -130,7 +131,7 @@ class PerforceDownloaderTest extends TestCase
$perforce = $this->getMockBuilder('Composer\Util\Perforce', $perforceMethods)->disableOriginalConstructor()->getMock();
$perforce->expects($this->at(0))->method('initializePath')->with($this->equalTo($this->testPath));
$perforce->expects($this->at(1))->method('setStream')->with($this->equalTo($ref));
$perforce->expects($this->at(2))->method('p4Login')->with($this->identicalTo($this->io));
$perforce->expects($this->at(2))->method('p4Login');
$perforce->expects($this->at(3))->method('writeP4ClientSpec');
$perforce->expects($this->at(4))->method('connectClient');
$perforce->expects($this->at(5))->method('syncCodeBase')->with($label);
@ -153,7 +154,7 @@ class PerforceDownloaderTest extends TestCase
$perforce = $this->getMockBuilder('Composer\Util\Perforce', $perforceMethods)->disableOriginalConstructor()->getMock();
$perforce->expects($this->at(0))->method('initializePath')->with($this->equalTo($this->testPath));
$perforce->expects($this->at(1))->method('setStream')->with($this->equalTo($ref));
$perforce->expects($this->at(2))->method('p4Login')->with($this->identicalTo($this->io));
$perforce->expects($this->at(2))->method('p4Login');
$perforce->expects($this->at(3))->method('writeP4ClientSpec');
$perforce->expects($this->at(4))->method('connectClient');
$perforce->expects($this->at(5))->method('syncCodeBase')->with($label);