public function testGet()
 {
     $data = [['name' => 'Instagram', 'url' => 'http://google.com', 'params' => ['style' => 'small']], ['name' => 'Instagram', 'url' => 'http://google.com', 'params' => []]];
     foreach ($data as $r) {
         $a = \IpadSlider\Factory\ResourceHandlerFactory::get($r['name'], $r['url'], $r['params']);
         $this->assertInstanceOf('\\IpadSlider\\Handler\\IResourceHandler', $a);
     }
 }
Exemple #2
0
 /**
  * @return null
  */
 public function getSerializedData()
 {
     $type = ResourceHandlerFactory::get($this->type, $this->url, $this->_getParams());
     if ($type->fetchData($this->url)) {
         return $type->renderHtml();
     }
     return null;
 }