コード例 #1
0
 public function testFromString()
 {
     $argsArray = array('foo' => 'bar');
     $anArguments = new Arguments($argsArray);
     $copyOfAnArguments = clone $anArguments;
     $otherArguments = $anArguments->fromString(json_encode(array('bat' => 'baz')));
     $this->assertTrue($anArguments->sameValueAs($copyOfAnArguments));
     $this->assertFalse($anArguments->sameValueAs($otherArguments));
     $this->assertEquals('baz', $otherArguments->argument('bat'));
 }
コード例 #2
0
 /**
  * @return Arguments
  */
 public function actionArguments()
 {
     $args = new Arguments(array());
     return $args->fromString($this->payload['arguments']);
 }
コード例 #3
0
 /**
  * @param ActionId      $anActionId
  * @param Type          $aType
  * @param Name          $aName
  * @param Arguments     $anArguments
  * @param WorkflowRunId $aWorkflowRunId
  */
 public function __construct(ActionId $anActionId, Type $aType, Name $aName, Arguments $anArguments, WorkflowRunId $aWorkflowRunId)
 {
     $anActionCreated = new ActionCreated(array('actionId' => $anActionId->toString(), 'type' => $aType->toString(), 'name' => $aName->toString(), 'arguments' => $anArguments->toString(), 'workflowRunId' => $aWorkflowRunId->toString()));
     $this->update($anActionCreated);
 }