function it_does_not_override_an_existing_statement(StatementRepositoryInterface $repository) { $statement = StatementFixtures::getTypicalStatement(); $repository->findStatementById($statement->getId()->getValue())->willReturn($statement); $repository->storeStatement($statement, true)->shouldNotBeCalled(); $this->putStatement($statement->getId(), $statement); }
public function getObjectsToValidate() { return array(array(StatementFixtures::getMinimalStatement(), 0), array(StatementFixtures::getTypicalStatement(), 0)); }
/** * @expectedException \Xabbuh\XApi\Common\Exception\NotFoundException */ public function testFetchingStatementAsVoidedStatementThrowsException() { $statement = StatementFixtures::getTypicalStatement()->withId(null); $statementId = $this->statementRepository->storeStatement($statement); $this->statementRepository->findVoidedStatementById($statementId); }