Пример #1
0
 /**
  * @dataProvider getAssetTypes
  */
 public function testPublicRepositoryWithInvalidUrl($type, $filename, $identifier)
 {
     $this->setExpectedException('Composer\\Downloader\\TransportException');
     $repoUrl = 'svn://example.tld/composer-test/repo-name/trunk';
     $io = $this->getMock('Composer\\IO\\IOInterface');
     $repoConfig = array('url' => $repoUrl, 'asset-type' => $type, 'filename' => $filename);
     $process = $this->getMock('Composer\\Util\\ProcessExecutor');
     $process->expects($this->any())->method('splitLines')->will($this->returnValue(array()));
     $process->expects($this->any())->method('execute')->will($this->returnCallback(function ($command) {
         return 0 === strpos($command, 'svn cat ') ? 1 : 0;
     }));
     /* @var IOInterface $io */
     /* @var ProcessExecutor $process */
     $driver = new SvnDriver($repoConfig, $io, $this->config, $process, null);
     $driver->initialize();
     $driver->getComposerInformation($identifier);
 }