Ejemplo n.º 1
0
 /**
  * Checks the getImage method
  *
  * @test
  * @group rendering
  * @group small
  * @group dev
  *
  */
 public function test_getImage()
 {
     // ARRANGE
     $item1 = $this->generateMediaInfoStorageItem('MEDIA-4100188d-48f1-49ea-99a1-71b518810b1c-MEDIA', 15, 1392029937);
     $itemMap = array($item1['id'] => $item1);
     $urlHelper = new TestMediaUrlHelper(self::URL_PREFIX);
     $mediaContext = $this->getMediaContext($itemMap, $urlHelper);
     $mediaId = 'MEDIA-4100188d-48f1-49ea-99a1-71b518810b1c-MEDIA';
     $mediaItem = new MediaItem($mediaContext, $mediaId);
     // ACT
     $image = $mediaItem->getImage();
     // ASSERT
     $this->assertEmpty($urlHelper->getCalls());
     $this->assertInstanceOf('\\Render\\APIs\\APIv1\\MediaImage', $image);
     $this->assertEquals($mediaItem, $image->getMediaItem());
 }
Ejemplo n.º 2
0
 protected function getFilePath()
 {
     return $this->mediaItem->getFilePath();
 }