forked from Sylius/Sylius
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Shop] Change customer id and address id to order token in routing
- Loading branch information
Showing
9 changed files
with
48 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ Feature: Registering a new account after checkout | |
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And on this channel account verification is not required | ||
And the store has a product "PHP T-Shirt" priced at "$19.99" | ||
And the store ships everywhere for free | ||
And the store allows paying offline | ||
|
@@ -21,6 +20,5 @@ Feature: Registering a new account after checkout | |
And I specify a password as "sylius" | ||
And I confirm this password | ||
And I register this account | ||
Then I should be notified that new account has been successfully created | ||
And my email should be "[email protected]" | ||
And I should be logged in | ||
And I verify my account using link sent to "[email protected]" | ||
Then I should be able to log in as "[email protected]" with "sylius" password |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
use Sylius\Component\Core\Factory\CustomerAfterCheckoutFactoryInterface; | ||
use Sylius\Component\Core\Model\AddressInterface; | ||
use Sylius\Component\Core\Model\CustomerInterface; | ||
use Sylius\Component\Core\Model\OrderInterface; | ||
use Sylius\Component\Resource\Factory\FactoryInterface; | ||
|
||
final class CustomerAfterCheckoutFactorySpec extends ObjectBehavior | ||
|
@@ -46,10 +47,15 @@ function it_creates_a_new_customer(FactoryInterface $baseCustomerFactory, Custom | |
function it_creates_a_new_customer_after_checkout( | ||
FactoryInterface $baseCustomerFactory, | ||
CustomerInterface $guest, | ||
OrderInterface $order, | ||
AddressInterface $address, | ||
CustomerInterface $customer | ||
): void { | ||
$order->getCustomer()->willReturn($guest); | ||
$order->getBillingAddress()->willReturn($address); | ||
|
||
$guest->getEmail()->willReturn('[email protected]'); | ||
|
||
$address->getFirstName()->willReturn('John'); | ||
$address->getLastName()->willReturn('Doe'); | ||
$address->getPhoneNumber()->willReturn('666777888'); | ||
|
@@ -61,6 +67,6 @@ function it_creates_a_new_customer_after_checkout( | |
$customer->setLastName('Doe')->shouldBeCalled(); | ||
$customer->setPhoneNumber('666777888')->shouldBeCalled(); | ||
|
||
$this->createAfterCheckout($guest, $address)->shouldReturn($customer); | ||
$this->createAfterCheckout($order)->shouldReturn($customer); | ||
} | ||
} |