public function initFromArrayDataProvider()
 {
     $dataFull = json_decode($this->loadFixture(static::FILE_FIXTURE_COMPLETE), true);
     $dataAttr = json_decode($this->loadFixture(static::FILE_FIXTURE_ATTR), true);
     $expectation = new DecisionTaskCompletedEventAttributes();
     $expectation->setScheduledEventId(2);
     $expectation->setStartedEventId(3);
     $expectation->setExecutionContext('contextValue');
     $expectation->setIsEmpty(false);
     return array(array('success-full' => array(static::INDEX_INPUT => $dataFull, static::INDEX_EXPECTATION => $expectation), 'success-attr' => array(static::INDEX_INPUT => $dataAttr, static::INDEX_EXPECTATION => $expectation)));
 }
Exemple #2
0
 /**
  * @return array
  */
 public function convertToArray()
 {
     if ($this->isEmpty) {
         return null;
     }
     $result = array(static::INDEX_EVENT_ID => $this->eventId, static::INDEX_EVENT_TYPE => $this->eventType, static::INDEX_EVENT_TIMESTAMP => $this->eventTimestamp);
     $result = array_merge($result, $this->activityTaskScheduledEventAttributes->convertToArray(), $this->activityTaskStartedEventAttributes->convertToArray(), $this->activityTaskCompletedEventAttributes->convertToArray());
     $result = array_merge($result, $this->decisionTaskScheduledEventAttributes->convertToArray(), $this->decisionTaskStartedEventAttributes->convertToArray(), $this->decisionTaskCompletedEventAttributes->convertToArray());
     return $result;
 }