/** * @return void */ public function testHasShouldReturnTrue() { $commandCollection = new CommandCollection(); $command = $this->getCommandMock(); $commandCollection->add($command, self::COMMAND_NAME); $this->assertTrue($commandCollection->has(self::COMMAND_NAME)); }
/** * @param \Spryker\Zed\Oms\Business\Process\TransitionInterface $transition * @param string $label * * @return array */ protected function addEdgeEventText(TransitionInterface $transition, $label) { if ($transition->hasEvent()) { $event = $transition->getEvent(); if ($event->isOnEnter()) { $label[] = '<b>' . $event->getName() . ' (on enter)</b>'; } else { $label[] = '<b>' . $event->getName() . '</b>'; } if ($event->hasTimeout()) { $label[] = 'timeout: ' . $event->getTimeout(); } if ($event->hasCommand()) { $commandLabel = 'c:' . $event->getCommand(); if ($this->commands->has($event->getCommand())) { $commandModel = $this->commands->get($event->getCommand()); if ($commandModel instanceof CommandByOrderInterface) { $commandLabel .= ' (by order)'; } else { $commandLabel .= ' (by item)'; } } else { $commandLabel .= ' ' . $this->notImplemented; } $label[] = $commandLabel; } if ($event->isManual()) { $label[] = 'manually executable'; } } else { $label[] = '∞'; } return $label; }