public function initFromArrayDataProvider() { $dataFull = json_decode($this->loadFixture(static::FILE_FIXTURE_1), true); $dataAttr = json_decode($this->loadFixture(static::FILE_FIXTURE_2), true); $taskList = new TaskList(); $taskList->setName('pocTasklist'); $expectation = new DecisionTaskScheduledEventAttributes(); $expectation->setStartToCloseTimeout(180); $expectation->setTaskPriority(1); $expectation->setTaskList($taskList); $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))); }
public function initFromArrayDataProvider() { $testData = json_decode($this->loadFixture(static::FILE_FIXTURE), true); $expectation = new ActivityTaskScheduledEventAttributes(); $taskList = new TaskList(); $taskList->setName('pocTasklist'); $expectation->setTaskList($taskList); $expectation->setActivityId('562f5893e3684'); $activityType = new ActivityType(); $activityType->setName('convert2Pdf'); $activityType->setVersion('1.0'); $expectation->setActivityType($activityType); $expectation->setDecisionTaskCompletedEventId(4); $expectation->setHeartbeatTimeout('120'); $expectation->setInput('abc'); $expectation->setScheduleToCloseTimeout('120'); $expectation->setScheduleToStartTimeout('120'); $expectation->setTaskPriority(1); $expectation->setStartToCloseTimeout('120'); $expectation->setIsEmpty(false); return array(array('success' => array(static::INDEX_INPUT => $testData, static::INDEX_EXPECTATION => $expectation))); }
public function pollForDecisionTaskDataProvider() { $request = json_decode($this->loadFixture(static::FIXTURE_DECISION_POLL_REQUEST), true); $response = json_decode($this->loadFixture(static::FIXTURE_DECISION_POLL_RESPONSE), true); $taskList = new TaskList(); $taskList->setName('taskListName'); $input = new DecisionPollRequest(); $input->setTaskList($taskList); $input->setIdentity('identityValue'); $input->setDomain('domainName'); $input->setMaximumPageSize(5); $input->setNextPageToken('nextTokenValue'); $input->setReverseOrder(false); $workflowType = new WorkflowType(); $workflowType->setName('customerOrderWorkflow'); $workflowType->setVersion('1.0'); $workflowType->setIsEmpty(false); $workflowExecution = new WorkflowExecution(); $workflowExecution->setRunId('06b8f87a-24b3-40b6-9ceb-9676f28e9493'); $workflowExecution->setWorkflowId('20110927-T-1'); $workflowExecution->setIsEmpty(false); $events = array(); foreach ($response[Event::INDEX_EVENTS] as $evt) { $event = new Event(); $event->initFromArray($evt); $events[] = $event; } $expectation = new DecisionTask(); $expectation->setTaskToken('taskTokenValue'); $expectation->setNextPageToken('nextPageTokenValue'); $expectation->setPreviousStartedEventId(0); $expectation->setWorkflowType($workflowType); $expectation->setWorkflowExecution($workflowExecution); $expectation->setStartedEventId(3); $expectation->setEvents($events); return array(array('success' => array(static::INDEX_INPUT => $input, static::INDEX_SWF_CLIENT_REQUEST_MOCK => $request, static::INDEX_SWF_CLIENT_RESPONSE_MOCK => $response, static::INDEX_EXPECTATION => $expectation))); }