Ejemplo n.º 1
0
 /**
  * @param HandlerFactory $factory
  * @param array $handlers
  */
 public function __construct(HandlerFactory $factory, array $handlers = [])
 {
     foreach ($handlers as $instance) {
         $this->handlers[] = $factory->create($instance);
     }
 }
 public function testCreateWithValidType()
 {
     $this->_objectManagerMock->expects($this->once())->method('create')->with('\\Magento\\Catalog\\Controller\\Adminhtml\\Product\\Initialization\\Helper\\Plugin\\Handler\\Composite')->will($this->returnValue('object'));
     $this->assertEquals('object', $this->_model->create('\\Magento\\Catalog\\Controller\\Adminhtml\\Product\\Initialization\\Helper\\Plugin\\Handler\\Composite'));
 }