-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor #226 Relate Invoice with Order (Zales0123)
This PR was merged into the 1.0-dev branch. Discussion ---------- Similar to Sylius/RefundPlugin#306 and Sylius/RefundPlugin#307. Should be easier to operate on the Invoice with a proper relation rather than just an order number Commits ------- 081b080 Add Order relation on Invoice (and remove order number field) e480edc Use order instead of order number in invoice repository 0ab7fed Final fixes ce949d3 Mention changes in the UPGRADE file 8411c18 Remove unneeded point in UPGRADE file
- Loading branch information
Showing
24 changed files
with
157 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,10 +40,10 @@ public function it_requests_an_email_with_an_invoice_to_be_sent( | |
OrderInterface $order, | ||
CustomerInterface $customer | ||
): void { | ||
$invoiceRepository->findOneByOrderNumber('0000001')->willReturn($invoice); | ||
|
||
$orderRepository->findOneByNumber('0000001')->willReturn($order); | ||
|
||
$invoiceRepository->findOneByOrder($order)->willReturn($invoice); | ||
|
||
$order->getCustomer()->willReturn($customer); | ||
|
||
$customer->getEmail()->willReturn('[email protected]'); | ||
|
@@ -60,8 +60,8 @@ public function it_does_not_request_an_email_to_be_sent_if_invoice_was_not_found | |
OrderInterface $order, | ||
CustomerInterface $customer | ||
): void { | ||
$invoiceRepository->findOneByOrderNumber('0000001')->willReturn(null); | ||
$orderRepository->findOneByNumber('0000001')->willReturn($order); | ||
$invoiceRepository->findOneByOrder($order)->willReturn(null); | ||
|
||
$order->getCustomer()->shouldNotBeCalled(); | ||
$customer->getEmail()->shouldNotBeCalled(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.