Exemple #1
0
 /**
  * @depends testCreate
  * @param BinaryFile $binaryFile
  */
 public function testGetMetadata(BinaryFile $binaryFile)
 {
     // @todo Add @depends on createFile
     $id = $binaryFile->id;
     $internalPath = $this->IOHandler->getInternalPath($id);
     $metadataHandlerMock = $this->getMock('eZ\\Publish\\Core\\IO\\MetadataHandler');
     $expectedMetadata = array('some' => 1, 'meta' => 2);
     $metadataHandlerMock->expects($this->once())->method('extract')->will($this->returnValue($expectedMetadata));
     $metadata = $this->IOHandler->getMetadata($metadataHandlerMock, $id);
     self::assertEquals($metadata, $expectedMetadata);
 }
Exemple #2
0
 /**
  * Returns the internal, handler level path to $externalPath
  * @param string $externalId
  * @return string
  */
 public function getInternalPath($externalId)
 {
     $path = $this->ioHandler->getInternalPath($this->getPrefixedUri($externalId));
     return $path;
 }