PHP Class Sylius\Behat\Context\Setup\ProductAssociationContext

Author: Grzegorz Sadowski ([email protected])
Inheritance: implements Behat\Behat\Context\Context
Show file Open project: sylius/sylius

Public Methods

Method Description
__construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Component\Resource\Factory\FactoryInterface $productAssociationTypeFactory, Sylius\Component\Resource\Factory\FactoryInterface $productAssociationFactory, Sylius\Component\Resource\Repository\RepositoryInterface $productAssociationTypeRepository, Sylius\Component\Resource\Repository\RepositoryInterface $productAssociationRepository )
theProductHasAnAssociationWithProduct ( Sylius\Component\Core\Model\ProductInterface $product, Sylius\Component\Product\Model\ProductAssociationTypeInterface $productAssociationType, Sylius\Component\Core\Model\ProductInterface $associatedProduct )
theProductHasAnAssociationWithProducts ( Sylius\Component\Core\Model\ProductInterface $product, Sylius\Component\Product\Model\ProductAssociationTypeInterface $productAssociationType, array $associatedProducts )
theStoreHasAProductAssociationType ( $name, $code = null )
theStoreHasProductAssociationTypes ( $names )

Private Methods

Method Description
createProductAssociation ( Sylius\Component\Core\Model\ProductInterface $product, Sylius\Component\Product\Model\ProductAssociationTypeInterface $productAssociationType, array $associatedProducts )
createProductAssociationType ( string $name, string | null $code = null )
generateCodeFromName ( string $name ) : string

Method Details

__construct() public method

public __construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Component\Resource\Factory\FactoryInterface $productAssociationTypeFactory, Sylius\Component\Resource\Factory\FactoryInterface $productAssociationFactory, Sylius\Component\Resource\Repository\RepositoryInterface $productAssociationTypeRepository, Sylius\Component\Resource\Repository\RepositoryInterface $productAssociationRepository )
$sharedStorage Sylius\Behat\Service\SharedStorageInterface
$productAssociationTypeFactory Sylius\Component\Resource\Factory\FactoryInterface
$productAssociationFactory Sylius\Component\Resource\Factory\FactoryInterface
$productAssociationTypeRepository Sylius\Component\Resource\Repository\RepositoryInterface
$productAssociationRepository Sylius\Component\Resource\Repository\RepositoryInterface

theProductHasAnAssociationWithProduct() public method

public theProductHasAnAssociationWithProduct ( Sylius\Component\Core\Model\ProductInterface $product, Sylius\Component\Product\Model\ProductAssociationTypeInterface $productAssociationType, Sylius\Component\Core\Model\ProductInterface $associatedProduct )
$product Sylius\Component\Core\Model\ProductInterface
$productAssociationType Sylius\Component\Product\Model\ProductAssociationTypeInterface
$associatedProduct Sylius\Component\Core\Model\ProductInterface

theProductHasAnAssociationWithProducts() public method

public theProductHasAnAssociationWithProducts ( Sylius\Component\Core\Model\ProductInterface $product, Sylius\Component\Product\Model\ProductAssociationTypeInterface $productAssociationType, array $associatedProducts )
$product Sylius\Component\Core\Model\ProductInterface
$productAssociationType Sylius\Component\Product\Model\ProductAssociationTypeInterface
$associatedProducts array

theStoreHasAProductAssociationType() public method

public theStoreHasAProductAssociationType ( $name, $code = null )

theStoreHasProductAssociationTypes() public method