Exemplo n.º 1
0
 public function testPublicRepositoryWithFilesystemCache()
 {
     $identifier = 'TEST_IDENTIFIER';
     $this->perforce->expects($this->any())->method('getComposerInformation')->with($this->equalTo($identifier))->will($this->returnValue(array('name' => 'foo')));
     $driver2 = new PerforceDriver($this->repoConfig, $this->io, $this->config, $this->process, $this->remoteFileSystem);
     $reflectionClass = new \ReflectionClass($driver2);
     $property = $reflectionClass->getProperty('perforce');
     $property->setAccessible(true);
     $property->setValue($driver2, $this->perforce);
     $this->driver->initialize();
     $driver2->initialize();
     $composer1 = $this->driver->getComposerInformation($identifier);
     $composer2 = $driver2->getComposerInformation($identifier);
     $this->assertNotNull($composer1);
     $this->assertNotNull($composer2);
     $this->assertSame($composer1, $composer2);
 }
Exemplo n.º 2
0
 private function setAssetPerforceToStream()
 {
     $this->perforce->setStream('//depot/branch');
 }
Exemplo n.º 3
0
 /**
  * @param array $repoConfig
  */
 private function initAssetPerforce($repoConfig)
 {
     if (!empty($this->perforce)) {
         return;
     }
     $repoDir = $this->config->get('cache-vcs-dir') . '/' . $this->depot;
     $this->perforce = Perforce::create($repoConfig, $this->getUrl(), $repoDir, $this->process, $this->io);
 }