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.
- Loading branch information
Showing
15 changed files
with
52 additions
and
28 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 |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
use Sylius\Component\Core\Model\ProductVariantInterface; | ||
use Sylius\Component\Core\Model\PromotionCouponInterface; | ||
use Sylius\Component\Core\Model\ShippingMethodInterface; | ||
use Sylius\Component\Core\Model\ShopUserInterface; | ||
use Sylius\Component\Core\OrderCheckoutTransitions; | ||
use Sylius\Component\Core\OrderPaymentTransitions; | ||
use Sylius\Component\Core\Repository\OrderRepositoryInterface; | ||
|
@@ -39,7 +40,6 @@ | |
use Sylius\Component\Resource\Factory\FactoryInterface; | ||
use Sylius\Component\Resource\Repository\RepositoryInterface; | ||
use Sylius\Component\Shipping\ShipmentTransitions; | ||
use Sylius\Component\User\Model\UserInterface; | ||
|
||
/** | ||
* @author Łukasz Chruściel <[email protected]> | ||
|
@@ -160,8 +160,8 @@ public function theGuestCustomerPlacedOrderWithForAndBasedShippingAddress( | |
/** @var CustomerInterface $customer */ | ||
$customer = $this->customerFactory->createNew(); | ||
$customer->setEmail($email); | ||
$customer->setFirstname('John'); | ||
$customer->setLastname('Doe'); | ||
$customer->setFirstName('John'); | ||
$customer->setLastName('Doe'); | ||
|
||
$this->customerRepository->add($customer); | ||
|
||
|
@@ -184,7 +184,7 @@ public function customerStartedCheckout(CustomerInterface $customer) | |
/** | ||
* @Given /^(I) placed (an order "[^"]+")$/ | ||
*/ | ||
public function iPlacedAnOrder(UserInterface $user, $orderNumber) | ||
public function iPlacedAnOrder(ShopUserInterface $user, $orderNumber) | ||
{ | ||
$customer = $user->getCustomer(); | ||
$order = $this->createOrder($customer, $orderNumber); | ||
|
@@ -401,7 +401,7 @@ public function iUsedCoupon(PromotionCouponInterface $coupon) | |
* @Given /^(I) have already placed (\d+) orders choosing ("[^"]+" product), ("[^"]+" shipping method) (to "[^"]+") with ("[^"]+" payment)$/ | ||
*/ | ||
public function iHaveAlreadyPlacedOrderNthTimes( | ||
UserInterface $user, | ||
ShopUserInterface $user, | ||
$numberOfOrders, | ||
ProductInterface $product, | ||
ShippingMethodInterface $shippingMethod, | ||
|
@@ -764,8 +764,8 @@ private function createCart( | |
$order = $this->orderFactory->createNew(); | ||
|
||
$order->setCustomer($customer); | ||
$order->setChannel((null !== $channel) ? $channel : $this->sharedStorage->get('channel')); | ||
$order->setLocaleCode((null !== $localeCode) ? $localeCode : $this->sharedStorage->get('locale')->getCode()); | ||
$order->setChannel($channel ?? $this->sharedStorage->get('channel')); | ||
$order->setLocaleCode($localeCode ?? $this->sharedStorage->get('locale')->getCode()); | ||
$order->setCurrencyCode($order->getChannel()->getBaseCurrency()->getCode()); | ||
|
||
return $order; | ||
|
@@ -990,7 +990,7 @@ private function placeOrder( | |
/** @var ChannelPricingInterface $channelPricing */ | ||
$channelPricing = $variant->getChannelPricingForChannel($this->sharedStorage->get('channel')); | ||
|
||
/** @var \Sylius\Component\Order\Model\OrderItemInterface $item */ | ||
/** @var OrderItemInterface $item */ | ||
$item = $this->orderItemFactory->createNew(); | ||
$item->setVariant($variant); | ||
$item->setUnitPrice($channelPricing->getPrice()); | ||
|
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