private function addReservation(UuidInterface $reservationId, UuidInterface $bookId, $email, \DateTime $givenAwayAt = null) { $reservation = new Reservation($reservationId, $bookId, $email); if (null !== $givenAwayAt) { $reservation->giveAway($givenAwayAt); } $this->repository->save($reservation); }
/** {@inheritdoc} */ protected function setUp() { $this->repository = new LocalReservationRepository(); $this->repository->clear(); }
private function clearDatabase() { $this->books->clear(); $this->reservations->clear(); }