public function testCreateWithValidType()
 {
     $this->_objectManagerMock->expects($this->once())->method('create')->with('Magento\\Catalog\\Model\\Product\\CopyConstructor\\Composite')->will($this->returnValue('object'));
     $this->assertEquals('object', $this->_model->create('Magento\\Catalog\\Model\\Product\\CopyConstructor\\Composite'));
 }
Ejemplo n.º 2
0
 /**
  * @param CopyConstructorFactory $factory
  * @param string[] $constructors
  */
 public function __construct(CopyConstructorFactory $factory, array $constructors = [])
 {
     foreach ($constructors as $instance) {
         $this->constructors[] = $factory->create($instance);
     }
 }