/** * @return \DateTime */ protected function createExpirationDate() { $dateInterval = \DateInterval::createFromDateString($this->omsConfig->getStateMachineLockerTimeoutInterval()); $expirationDate = new \DateTime(); $expirationDate->add($dateInterval); return $expirationDate; }
/** * @return void */ public function testGetProcessDefinitionLocationDefaultPathMustBeAbsolute() { $omsConfig = new OmsConfig(); $reflectionClass = new \ReflectionClass(Config::class); $reflectionProperty = $reflectionClass->getProperty('config'); $reflectionProperty->setAccessible(true); $reflectionProperty->setValue(['foo' => 'bar']); $this->assertStringStartsWith(APPLICATION_ROOT_DIR, $omsConfig->getProcessDefinitionLocation()); }
/** * @return array */ protected function getStateBlacklist() { $blacklist = $this->config->getStateBlacklist(); $result = $this->queryContainer->querySalesOrderItemStatesByName($blacklist)->find(); $blacklist = []; foreach ($result as $row) { $blacklist[] = $row->getIdOmsOrderItemState(); } return $blacklist; }