public function testGetStatementsWithAgentInStatementsFilter() { // {"mbox":"mailto:alice@example.com","objectType":"Agent"} $filter = new StatementsFilter(); $agent = new Agent('mailto:alice@example.com'); $filter->byActor($agent); $statementResult = $this->createStatementResult(); $agentJson = '{"mbox":"mailto:alice@example.com","objectType":"Agent"}'; $this->serializer->expects($this->once())->method('serialize')->with($agent, 'json')->will($this->returnValue($agentJson)); $this->validateRetrieveApiCall('get', 'statements', array('agent' => $agentJson), 200, 'StatementResult', $statementResult); $this->assertEquals($statementResult, $this->client->getStatements($filter)); }
/** * @expectedException \InvalidArgumentException */ public function testByActorWithNotIdentifiedGroup() { $this->statementsFilter->byActor(new Group()); }