Пример #1
0
 /**
  * Get composer content.
  *
  * @param string $identifier
  *
  * @return array
  */
 protected function getComposerContent($identifier)
 {
     $composer = $this->perforce->getComposerInformation($identifier);
     if (empty($composer) || !is_array($composer)) {
         $composer = array('_nonexistent_package' => true);
     }
     return $composer;
 }
Пример #2
0
 public function testGetComposerInformationWithLabelWithStreamWithNoChange()
 {
     $this->setAssetPerforceToStream();
     $expectedCommand = 'p4 -u user -p port  files //depot/branch/ASSET.json@0.0.1';
     $this->processExecutor->expects($this->at(0))->method('execute')->with($this->equalTo($expectedCommand))->will($this->returnCallback(function ($command, &$output) {
         $output = '//depot/ASSET.json#1 - branch 10001 (text)';
         return $command ? true : true;
     }));
     $result = $this->perforce->getComposerInformation('//depot/branch@0.0.1');
     $this->assertSame('', $result);
 }