public function testRender() { $url = 'http://www.example.com/foo.jpg'; $options = array('attributes' => array('class' => 'thumbnail')); $expectedXml = '<img src="http://www.example.com/foo.jpg" title="sample" width="50" height="30" class="thumbnail" />'; $rendered = $this->provider->render($this->media, $this->variant, $url, $options); $this->assertXmlStringEqualsXmlString($expectedXml, $rendered); }
/** * Constructor * * @param string $tempDir * @param \Imagine\Image\ImagineInterface $imagine * @param \Oryzone\MediaStorage\Integration\Video\VideoServiceInterface $service * @param \Oryzone\MediaStorage\Downloader\DownloaderInterface $downloader */ public function __construct($tempDir, ImagineInterface $imagine, VideoServiceInterface $service, DownloaderInterface $downloader = NULL) { parent::__construct($tempDir, $imagine); $this->service = $service; if ($downloader == NULL) { $downloader = new CurlDownloader(); } $this->downloader = $downloader; }