protected function setUp() { $this->queryResultId = new QueryResultId(Uuid::uuid4()); $this->metaInformation = new MetaInformation(new WorkflowRunId(Uuid::uuid4()), new ActionId(Uuid::uuid4()), new Name('TestQuery'), new Arguments(array('foo' => 'bar')), 1); $this->result = new Item('A result item'); $this->queryResultCreated = new QueryResultCreated(array('queryResultId' => $this->queryResultId->toString(), 'metaInformation' => $this->metaInformation->toArray(), 'result' => array('resultClass' => get_class($this->result), 'data' => $this->result->toJSON()))); }
public function testToString() { $anUuid = Uuid::uuid4(); $aQueryResultId = new QueryResultId($anUuid); $this->assertEquals($anUuid->toString(), $aQueryResultId->toString()); }
/** * @param QueryResultId $aQueryResultId * @param MetaInformation $aMetaInformation * @param Result $aResult */ public function __construct(QueryResultId $aQueryResultId, MetaInformation $aMetaInformation, Result $aResult) { $this->update(new QueryResultCreated(array('queryResultId' => $aQueryResultId->toString(), 'metaInformation' => $aMetaInformation->toArray(), 'result' => array('resultClass' => get_class($aResult), 'data' => $aResult->toJSON())))); }
/** * @param QueryResultId $aQueryResultId * @return QueryResult */ public function getQueryResultOfId(QueryResultId $aQueryResultId) { return $this->find($aQueryResultId->toString()); }