public function testFindOneByIdThrowsException() { $this->setExpectedException(EntityNotFoundException::class, 'Attachment not found'); $this->attachmentRepository->findOneById($this->dummyData->getId()); }
/** * @param UuidInterface $attachmentId * @return Attachment * @throws EntityNotFoundException */ public function getOneById(UuidInterface $attachmentId) { return $this->attachmentRepository->findOneById($attachmentId); }