mirror of
https://github.com/composer/composer
synced 2025-05-09 16:42:57 +00:00
Added error handling and error messages around missing perforce driver, invalid username/password
This commit is contained in:
parent
ae3b7ad5c0
commit
a8084e46ff
3 changed files with 45 additions and 33 deletions
|
@ -40,7 +40,7 @@ class PerforceDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
$this->io = $this->getMock('Composer\IO\IOInterface');
|
||||
}
|
||||
|
||||
public function testDoDownloadGetRepoConfig()
|
||||
public function testInitPerforceGetRepoConfig()
|
||||
{
|
||||
$downloader = new PerforceDownloader($this->io, $this->config);
|
||||
$package = $this->getMock('Composer\Package\PackageInterface');
|
||||
|
@ -51,18 +51,12 @@ class PerforceDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
array($repoConfig, $this->io, $this->config)
|
||||
);
|
||||
$package->expects($this->at(0))
|
||||
->method('getSourceReference')
|
||||
->will($this->returnValue('SOURCE_REF'));
|
||||
$package->expects($this->at(1))
|
||||
->method('getPrettyVersion')
|
||||
->will($this->returnValue('100'));
|
||||
$package->expects($this->at(2))
|
||||
->method('getRepository')
|
||||
->will($this->returnValue($repository));
|
||||
$repository->expects($this->at(0))
|
||||
->method('getRepoConfig');
|
||||
$path = $this->testPath;
|
||||
$downloader->doDownload($package, $path);
|
||||
$downloader->initPerforce($package, $path, 'SOURCE_REF');
|
||||
}
|
||||
|
||||
public function testDoDownload()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue