Ejemplo n.º 1
0
 /**
  * @see Dfp_Option_Interface::setOptions()
  * @return Dfp_Datafeed_Transfer
  */
 public function setOptions(array $options)
 {
     if (isset($options['adapter'])) {
         if ($options['adapter'] instanceof Dfp_Datafeed_Transfer_Adapter_Interface) {
             $this->setAdapter($options['adapter']);
         } else {
             $this->setAdapter(Dfp_Datafeed_Transfer_Adapter_Abstract::factory($options['adapter']));
         }
         unset($options['adapter']);
     }
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * @see Dfp_Option_Interface::__construct()
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
 }
Ejemplo n.º 3
0
 /**
  * @dataProvider factoryProvider
  */
 public function testFactory($targetClass, $options)
 {
     //generate the expected classname in php's memory
     $this->getMockForAbstractClass('Dfp_Datafeed_Transfer_Adapter_Abstract', array(), $targetClass);
     $class = Dfp_Datafeed_Transfer_Adapter_Abstract::factory($options);
     $this->assertInstanceOf($targetClass, $class);
 }