Optimized order repository and implemented tests

This commit is contained in:
Kevin Frantz
2018-07-15 16:09:37 +02:00
parent aa18f2b18e
commit 541c472f15
3 changed files with 60 additions and 3 deletions

View File

@@ -65,6 +65,8 @@ final class Order extends AbstractDefaultController implements OrderInterface
$this->core->getBasket()->setCustomer($this->core->getUser());
if($this->orderRepository->saveOrder($this->core->getBasket())){
$this->core->setBasket(new OrderEntity());
}else{
throw new \Exception('Order could not be saved!');
}
}
}