Skip to content

Commit 41b9e57

Browse files
committed
HM-1: Spec
1 parent 8db1f44 commit 41b9e57

File tree

46 files changed

+192
-216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+192
-216
lines changed

spec/Checker/ProductProcessingCheckerSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
namespace spec\Sylius\WishlistPlugin\Checker;
1515

16-
use Sylius\WishlistPlugin\Checker\ProductProcessingChecker;
17-
use Sylius\WishlistPlugin\Command\Wishlist\WishlistItem;
1816
use PhpSpec\ObjectBehavior;
1917
use Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface;
2018
use Sylius\Component\Core\Model\OrderItemInterface;
19+
use Sylius\WishlistPlugin\Checker\ProductProcessingChecker;
20+
use Sylius\WishlistPlugin\Command\Wishlist\WishlistItem;
2121

2222
final class ProductProcessingCheckerSpec extends ObjectBehavior
2323
{

spec/Checker/ProductQuantityCheckerSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
namespace spec\Sylius\WishlistPlugin\Checker;
1515

16-
use Sylius\WishlistPlugin\Checker\ProductQuantityChecker;
1716
use PhpSpec\ObjectBehavior;
1817
use Sylius\Component\Order\Model\OrderItemInterface;
18+
use Sylius\WishlistPlugin\Checker\ProductQuantityChecker;
1919

2020
final class ProductQuantityCheckerSpec extends ObjectBehavior
2121
{

spec/Checker/WishlistNameCheckerSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
/*
3+
/*
44
* This file is part of the Sylius package.
55
*
66
* (c) Sylius Sp. z o.o.
@@ -13,8 +13,8 @@
1313

1414
namespace spec\Sylius\WishlistPlugin\Checker;
1515

16-
use Sylius\WishlistPlugin\Checker\WishlistNameChecker;
1716
use PhpSpec\ObjectBehavior;
17+
use Sylius\WishlistPlugin\Checker\WishlistNameChecker;
1818

1919
final class WishlistNameCheckerSpec extends ObjectBehavior
2020
{

spec/CommandHandler/Wishlist/AddProductToSelectedWishlistHandlerSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313

1414
namespace spec\Sylius\WishlistPlugin\CommandHandler\Wishlist;
1515

16+
use PhpSpec\ObjectBehavior;
17+
use Sylius\Component\Core\Model\ProductInterface;
1618
use Sylius\WishlistPlugin\Command\Wishlist\AddProductToSelectedWishlistInterface;
1719
use Sylius\WishlistPlugin\CommandHandler\Wishlist\AddProductToSelectedWishlistHandler;
1820
use Sylius\WishlistPlugin\Entity\WishlistInterface;
1921
use Sylius\WishlistPlugin\Entity\WishlistProductInterface;
2022
use Sylius\WishlistPlugin\Factory\WishlistProductFactoryInterface;
2123
use Sylius\WishlistPlugin\Repository\WishlistRepositoryInterface;
22-
use PhpSpec\ObjectBehavior;
23-
use Sylius\Component\Core\Model\ProductInterface;
2424

2525
final class AddProductToSelectedWishlistHandlerSpec extends ObjectBehavior
2626
{

spec/CommandHandler/Wishlist/AddProductToWishlistHandlerSpec.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
/*
3+
/*
44
* This file is part of the Sylius package.
55
*
66
* (c) Sylius Sp. z o.o.
@@ -13,16 +13,16 @@
1313

1414
namespace spec\Sylius\WishlistPlugin\CommandHandler\Wishlist;
1515

16+
use Doctrine\Persistence\ObjectManager;
17+
use PhpSpec\ObjectBehavior;
18+
use Sylius\Component\Core\Model\ProductInterface;
19+
use Sylius\Component\Core\Repository\ProductRepositoryInterface;
1620
use Sylius\WishlistPlugin\Command\Wishlist\AddProductToWishlist;
1721
use Sylius\WishlistPlugin\CommandHandler\Wishlist\AddProductToWishlistHandler;
1822
use Sylius\WishlistPlugin\Entity\WishlistInterface;
1923
use Sylius\WishlistPlugin\Entity\WishlistProductInterface;
2024
use Sylius\WishlistPlugin\Exception\ProductNotFoundException;
2125
use Sylius\WishlistPlugin\Factory\WishlistProductFactoryInterface;
22-
use Doctrine\Persistence\ObjectManager;
23-
use PhpSpec\ObjectBehavior;
24-
use Sylius\Component\Core\Model\ProductInterface;
25-
use Sylius\Component\Core\Repository\ProductRepositoryInterface;
2626

2727
final class AddProductToWishlistHandlerSpec extends ObjectBehavior
2828
{

spec/CommandHandler/Wishlist/AddProductVariantToWishlistHandlerSpec.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313

1414
namespace spec\Sylius\WishlistPlugin\CommandHandler\Wishlist;
1515

16+
use Doctrine\Persistence\ObjectManager;
17+
use PhpSpec\ObjectBehavior;
18+
use Sylius\Component\Core\Model\ProductVariantInterface;
19+
use Sylius\Component\Core\Repository\ProductVariantRepositoryInterface;
1620
use Sylius\WishlistPlugin\Command\Wishlist\AddProductVariantToWishlist;
1721
use Sylius\WishlistPlugin\CommandHandler\Wishlist\AddProductVariantToWishlistHandler;
1822
use Sylius\WishlistPlugin\Entity\WishlistInterface;
1923
use Sylius\WishlistPlugin\Entity\WishlistProductInterface;
2024
use Sylius\WishlistPlugin\Exception\ProductVariantNotFoundException;
2125
use Sylius\WishlistPlugin\Factory\WishlistProductFactoryInterface;
22-
use Doctrine\Persistence\ObjectManager;
23-
use PhpSpec\ObjectBehavior;
24-
use Sylius\Component\Core\Model\ProductVariantInterface;
25-
use Sylius\Component\Core\Repository\ProductVariantRepositoryInterface;
2626

2727
final class AddProductVariantToWishlistHandlerSpec extends ObjectBehavior
2828
{

spec/CommandHandler/Wishlist/AddProductsToCartHandlerSpec.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313

1414
namespace spec\Sylius\WishlistPlugin\CommandHandler\Wishlist;
1515

16-
use Sylius\WishlistPlugin\Command\Wishlist\AddProductsToCartInterface;
17-
use Sylius\WishlistPlugin\Command\Wishlist\WishlistItemInterface;
18-
use Sylius\WishlistPlugin\CommandHandler\Wishlist\AddProductsToCartHandler;
19-
use Sylius\WishlistPlugin\Exception\InsufficientProductStockException;
20-
use Sylius\WishlistPlugin\Exception\InvalidProductQuantityException;
2116
use Doctrine\Common\Collections\ArrayCollection;
2217
use PhpSpec\ObjectBehavior;
2318
use Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface;
@@ -27,6 +22,11 @@
2722
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
2823
use Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface;
2924
use Sylius\Component\Order\Modifier\OrderModifierInterface;
25+
use Sylius\WishlistPlugin\Command\Wishlist\AddProductsToCartInterface;
26+
use Sylius\WishlistPlugin\Command\Wishlist\WishlistItemInterface;
27+
use Sylius\WishlistPlugin\CommandHandler\Wishlist\AddProductsToCartHandler;
28+
use Sylius\WishlistPlugin\Exception\InsufficientProductStockException;
29+
use Sylius\WishlistPlugin\Exception\InvalidProductQuantityException;
3030

3131
final class AddProductsToCartHandlerSpec extends ObjectBehavior
3232
{

spec/CommandHandler/Wishlist/AddSelectedProductsToCartHandlerSpec.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313

1414
namespace spec\Sylius\WishlistPlugin\CommandHandler\Wishlist;
1515

16-
use Sylius\WishlistPlugin\Command\Wishlist\AddSelectedProductsToCart;
17-
use Sylius\WishlistPlugin\Command\Wishlist\WishlistItem;
18-
use Sylius\WishlistPlugin\Command\Wishlist\WishlistItemInterface;
19-
use Sylius\WishlistPlugin\CommandHandler\Wishlist\AddSelectedProductsToCartHandler;
20-
use Sylius\WishlistPlugin\Exception\InvalidProductQuantityException;
2116
use Doctrine\Common\Collections\ArrayCollection;
2217
use PhpSpec\ObjectBehavior;
2318
use Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface;
@@ -28,6 +23,11 @@
2823
use Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface;
2924
use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface;
3025
use Sylius\Component\Order\Modifier\OrderModifierInterface;
26+
use Sylius\WishlistPlugin\Command\Wishlist\AddSelectedProductsToCart;
27+
use Sylius\WishlistPlugin\Command\Wishlist\WishlistItem;
28+
use Sylius\WishlistPlugin\Command\Wishlist\WishlistItemInterface;
29+
use Sylius\WishlistPlugin\CommandHandler\Wishlist\AddSelectedProductsToCartHandler;
30+
use Sylius\WishlistPlugin\Exception\InvalidProductQuantityException;
3131

3232
final class AddSelectedProductsToCartHandlerSpec extends ObjectBehavior
3333
{

spec/CommandHandler/Wishlist/AddWishlistToUserHandlerSpec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313

1414
namespace spec\Sylius\WishlistPlugin\CommandHandler\Wishlist;
1515

16+
use PhpSpec\ObjectBehavior;
17+
use Sylius\Component\Core\Model\ShopUserInterface;
1618
use Sylius\WishlistPlugin\Command\Wishlist\AddWishlistToUser;
1719
use Sylius\WishlistPlugin\CommandHandler\Wishlist\AddWishlistToUserHandler;
1820
use Sylius\WishlistPlugin\Entity\WishlistInterface;
1921
use Sylius\WishlistPlugin\Exception\WishlistHasAnotherShopUserException;
2022
use Sylius\WishlistPlugin\Repository\WishlistRepositoryInterface;
2123
use Sylius\WishlistPlugin\Resolver\WishlistCookieTokenResolverInterface;
22-
use PhpSpec\ObjectBehavior;
23-
use Sylius\Component\Core\Model\ShopUserInterface;
2424

2525
final class AddWishlistToUserHandlerSpec extends ObjectBehavior
2626
{

spec/CommandHandler/Wishlist/CopySelectedProductsToOtherWishlistHandlerSpec.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
/*
3+
/*
44
* This file is part of the Sylius package.
55
*
66
* (c) Sylius Sp. z o.o.
@@ -13,13 +13,13 @@
1313

1414
namespace spec\Sylius\WishlistPlugin\CommandHandler\Wishlist;
1515

16+
use Doctrine\Common\Collections\Collection;
17+
use PhpSpec\ObjectBehavior;
1618
use Sylius\WishlistPlugin\Command\Wishlist\CopySelectedProductsToOtherWishlistInterface;
1719
use Sylius\WishlistPlugin\CommandHandler\Wishlist\CopySelectedProductsToOtherWishlistHandler;
1820
use Sylius\WishlistPlugin\Duplicator\WishlistProductsToOtherWishlistDuplicatorInterface;
1921
use Sylius\WishlistPlugin\Entity\WishlistInterface;
2022
use Sylius\WishlistPlugin\Repository\WishlistRepositoryInterface;
21-
use Doctrine\Common\Collections\Collection;
22-
use PhpSpec\ObjectBehavior;
2323

2424
final class CopySelectedProductsToOtherWishlistHandlerSpec extends ObjectBehavior
2525
{

0 commit comments

Comments
 (0)