PHP Class spec\Sylius\Bundle\CoreBundle\Validator\Constraints\CartItemAvailabilityValidatorSpec

Author: Arkadiusz Krakowiak ([email protected])
Inheritance: extends PhpSpec\ObjectBehavior
Afficher le fichier Open project: sylius/sylius

Méthodes publiques

Méthode Description
it_adds_violation_if_requested_cart_item_is_not_available ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
it_adds_violation_if_total_quantity_of_cart_items_exceed_available_quantity ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\OrderItemInterface $existingOrderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
it_does_not_add_violation_if_requested_cart_item_is_available ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
it_does_not_add_violation_if_total_quantity_of_cart_items_do_not_exceed_available_quantity ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\OrderItemInterface $existingOrderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
it_is_cart_item_availability_validator ( Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand )
it_is_constraint_validator ( )
it_is_initializable ( )
it_validates_only_add_cart_item_commands ( Sylius\Component\Core\Model\OrderInterface $order )
let ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker )

Method Details

it_adds_violation_if_requested_cart_item_is_not_available() public méthode

public it_adds_violation_if_requested_cart_item_is_not_available ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$executionContext Symfony\Component\Validator\Context\ExecutionContextInterface
$availabilityChecker Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface
$addCartItemCommand Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface
$order Sylius\Component\Core\Model\OrderInterface
$orderItem Sylius\Component\Core\Model\OrderItemInterface
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

it_adds_violation_if_total_quantity_of_cart_items_exceed_available_quantity() public méthode

public it_adds_violation_if_total_quantity_of_cart_items_exceed_available_quantity ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\OrderItemInterface $existingOrderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$executionContext Symfony\Component\Validator\Context\ExecutionContextInterface
$availabilityChecker Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface
$addCartItemCommand Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface
$order Sylius\Component\Core\Model\OrderInterface
$orderItem Sylius\Component\Core\Model\OrderItemInterface
$existingOrderItem Sylius\Component\Core\Model\OrderItemInterface
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

it_does_not_add_violation_if_requested_cart_item_is_available() public méthode

public it_does_not_add_violation_if_requested_cart_item_is_available ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$executionContext Symfony\Component\Validator\Context\ExecutionContextInterface
$availabilityChecker Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface
$addCartItemCommand Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface
$order Sylius\Component\Core\Model\OrderInterface
$orderItem Sylius\Component\Core\Model\OrderItemInterface
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

it_does_not_add_violation_if_total_quantity_of_cart_items_do_not_exceed_available_quantity() public méthode

public it_does_not_add_violation_if_total_quantity_of_cart_items_do_not_exceed_available_quantity ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker, Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand, Sylius\Component\Core\Model\OrderInterface $order, Sylius\Component\Core\Model\OrderItemInterface $orderItem, Sylius\Component\Core\Model\OrderItemInterface $existingOrderItem, Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$executionContext Symfony\Component\Validator\Context\ExecutionContextInterface
$availabilityChecker Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface
$addCartItemCommand Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface
$order Sylius\Component\Core\Model\OrderInterface
$orderItem Sylius\Component\Core\Model\OrderItemInterface
$existingOrderItem Sylius\Component\Core\Model\OrderItemInterface
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

it_is_cart_item_availability_validator() public méthode

public it_is_cart_item_availability_validator ( Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface $addCartItemCommand )
$addCartItemCommand Sylius\Bundle\OrderBundle\Controller\AddToCartCommandInterface

it_is_constraint_validator() public méthode

it_is_initializable() public méthode

public it_is_initializable ( )

it_validates_only_add_cart_item_commands() public méthode

public it_validates_only_add_cart_item_commands ( Sylius\Component\Core\Model\OrderInterface $order )
$order Sylius\Component\Core\Model\OrderInterface

let() public méthode

public let ( Symfony\Component\Validator\Context\ExecutionContextInterface $executionContext, Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface $availabilityChecker )
$executionContext Symfony\Component\Validator\Context\ExecutionContextInterface
$availabilityChecker Sylius\Component\Inventory\Checker\AvailabilityCheckerInterface