Пример #1
0
 public function testEmptyImagePlaceholder()
 {
     $c = $this->_root->getComponentById('1604');
     $this->assertTrue($c->hasContent());
     $url = $c->getComponent()->getImageUrl();
     $this->assertNotNull($url);
     $assertion = array('width' => 16, 'height' => 16, 'rotate' => 0, 'crop' => array('width' => 16, 'height' => 16, 'x' => 0, 'y' => 0), 'keepOriginal' => true);
     $this->assertEquals($assertion, $c->getComponent()->getImageDimensions());
     $o = Kwc_Basic_Image_Component::getMediaOutput($c->componentId, Kwf_Media::DONT_HASH_TYPE_PREFIX . '16-abc', $c->componentClass);
     $this->assertNotNull($o);
     $this->assertEquals('image/png', $o['mimeType']);
     $this->assertContains('/EmptyImageComponent/empty.png', $o['file']);
 }
 public static function getMediaOutput($id, $type, $className)
 {
     self::$getMediaOutputCalled++;
     return parent::getMediaOutput($id, $type, $className);
 }