Пример #1
0
 /**
  * Adds operations to task
  *
  * @param string $operationCode
  * @param mixed $arguments
  * @return void
  */
 public function addOperation($operationCode, $arguments = null)
 {
     $this->operationsList[] = $this->operationFactory->create($operationCode, $arguments);
 }
Пример #2
0
 public function testCreateException()
 {
     $notRegisteredOperation = 'coffee';
     $this->setExpectedException('Magento\\Tools\\Di\\App\\Task\\OperationException', sprintf('Unrecognized operation "%s"', $notRegisteredOperation), OperationException::UNAVAILABLE_OPERATION);
     $this->factory->create($notRegisteredOperation);
 }