예제 #1
0
 /**
  * @return \DateTime
  */
 protected function createExpirationDate()
 {
     $dateInterval = \DateInterval::createFromDateString($this->omsConfig->getStateMachineLockerTimeoutInterval());
     $expirationDate = new \DateTime();
     $expirationDate->add($dateInterval);
     return $expirationDate;
 }
예제 #2
0
 /**
  * @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());
 }
예제 #3
0
 /**
  * @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;
 }