/** * Gets entrance fee model * * @return EntranceFee * * @throws LogicException */ protected function getEntranceFee() { $fee = $this->repository->findEntranceFee(); if (is_null($fee)) { $this->logger->alert('No fee configured'); throw new PaymentMessage('No fee is configured'); } return $fee; }
public function testFindFee() { $this->repository->expects($this->once())->method('findOne')->with(['-class' => 'fee']); $this->sut->findEntranceFee(); }