/** * 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); }
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); }