コード例 #1
0
 /**
  * @param \HsBremen\WebApi\Order\OrderEvent $event
  *
  * @throws \HsBremen\WebApi\Database\DatabaseException
  */
 public function getOrderDetails(OrderEvent $event)
 {
     $order = $this->orderRepository->getById($event->getOrderId());
     $event->setOrder($order);
 }
コード例 #2
0
 /**
  * @test
  * @expectedException \HsBremen\WebApi\Database\DatabaseException
  * @expectedExceptionMessage Order with id "1" not exists!
  */
 public function orderByIdNotFound()
 {
     $this->db->expects(self::once())->method('fetchAll')->willReturn([]);
     $this->repository->getById(1);
 }