PHP Class Sylius\Behat\Context\Setup\ShippingContext

Author: Arkadiusz Krakowiak ([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\Shipping\Repository\ShippingMethodRepositoryInterface $shippingMethodRepository, Sylius\Component\Resource\Repository\RepositoryInterface $zoneRepository, Sylius\Component\Resource\Factory\FactoryInterface $shippingMethodFactory, Sylius\Component\Resource\Factory\FactoryInterface $shippingMethodTranslationFactory, Doctrine\Common\Persistence\ObjectManager $shippingMethodManager )
shippingMethodBelongsToTaxCategory ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod, Sylius\Component\Taxation\Model\TaxCategoryInterface $taxCategory )
storeHasDisabledShippingMethodWithFee ( $shippingMethodName, $fee )
storeHasShippingMethodWithFee ( $shippingMethodName, $fee, Sylius\Component\Addressing\Model\ZoneInterface $zone = null )
storeHasShippingMethodWithFeeNotAssignedToAnyChannel ( $shippingMethodName, $fee )
storeHasShippingMethodWithFeePerShipmentForChannels ( $shippingMethodName, $firstFee, Sylius\Component\Core\Model\ChannelInterface $firstChannel, $secondFee, Sylius\Component\Core\Model\ChannelInterface $secondChannel )
storeHasShippingMethodWithFeePerUnitForChannels ( $shippingMethodName, $firstFee, Sylius\Component\Core\Model\ChannelInterface $firstChannel, $secondFee, Sylius\Component\Core\Model\ChannelInterface $secondChannel )
storeShipsEverythingForFree ( Sylius\Component\Addressing\Model\ZoneInterface $zone = null )
theShippingMethodIsDisabled ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod )
theShippingMethodIsEnabled ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod )
theStoreAllowsShippingMethod ( $name, $code = null, $position = null )
theStoreAllowsShippingWithAnd ( $firstName, $secondName )
theStoreHasShippingMethodWithFeePerUnit ( $shippingMethodName, $fee )
theStoreShipsEverywhereForFree ( )
theStoreShipsEverywhereForFreeForAllChannels ( array $channels )
thisShippingMethodIsNamedInLocale ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod, $name, $locale )
thisShippingMethodRequiresAtLeastOneUnitMatchToShippingCategory ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod, Sylius\Component\Shipping\Model\ShippingCategoryInterface $shippingCategory )
thisShippingMethodRequiresThatAllUnitsMatchToShippingCategory ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod, Sylius\Component\Shipping\Model\ShippingCategoryInterface $shippingCategory )
thisShippingMethodRequiresThatNoUnitsMatchToShippingCategory ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod, Sylius\Component\Shipping\Model\ShippingCategoryInterface $shippingCategory )

Private Methods

Method Description
createShippingMethod ( string $name, string | null $code = null, integer | null $position = null, Sylius\Component\Addressing\Model\ZoneInterface $zone = null, string $locale = 'en', array $configuration = [], string $calculator = DefaultCalculators::FLAT_RATE, boolean $enabled = true, boolean $addForCurrentChannel = true, array $channels = [] ) : Sylius\Component\Core\Model\ShippingMethodInterface
generateCodeFromNameAndZone ( string $shippingMethodName, string | null $zoneCode = null ) : string
getConfigurationByChannels ( array $channels, integer $amount ) : array

Method Details

__construct() public method

public __construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Component\Shipping\Repository\ShippingMethodRepositoryInterface $shippingMethodRepository, Sylius\Component\Resource\Repository\RepositoryInterface $zoneRepository, Sylius\Component\Resource\Factory\FactoryInterface $shippingMethodFactory, Sylius\Component\Resource\Factory\FactoryInterface $shippingMethodTranslationFactory, Doctrine\Common\Persistence\ObjectManager $shippingMethodManager )
$sharedStorage Sylius\Behat\Service\SharedStorageInterface
$shippingMethodRepository Sylius\Component\Shipping\Repository\ShippingMethodRepositoryInterface
$zoneRepository Sylius\Component\Resource\Repository\RepositoryInterface
$shippingMethodFactory Sylius\Component\Resource\Factory\FactoryInterface
$shippingMethodTranslationFactory Sylius\Component\Resource\Factory\FactoryInterface
$shippingMethodManager Doctrine\Common\Persistence\ObjectManager

shippingMethodBelongsToTaxCategory() public method

public shippingMethodBelongsToTaxCategory ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod, Sylius\Component\Taxation\Model\TaxCategoryInterface $taxCategory )
$shippingMethod Sylius\Component\Core\Model\ShippingMethodInterface
$taxCategory Sylius\Component\Taxation\Model\TaxCategoryInterface

storeHasDisabledShippingMethodWithFee() public method

public storeHasDisabledShippingMethodWithFee ( $shippingMethodName, $fee )

storeHasShippingMethodWithFee() public method

public storeHasShippingMethodWithFee ( $shippingMethodName, $fee, Sylius\Component\Addressing\Model\ZoneInterface $zone = null )
$zone Sylius\Component\Addressing\Model\ZoneInterface

storeHasShippingMethodWithFeeNotAssignedToAnyChannel() public method

public storeHasShippingMethodWithFeeNotAssignedToAnyChannel ( $shippingMethodName, $fee )

storeHasShippingMethodWithFeePerShipmentForChannels() public method

public storeHasShippingMethodWithFeePerShipmentForChannels ( $shippingMethodName, $firstFee, Sylius\Component\Core\Model\ChannelInterface $firstChannel, $secondFee, Sylius\Component\Core\Model\ChannelInterface $secondChannel )
$firstChannel Sylius\Component\Core\Model\ChannelInterface
$secondChannel Sylius\Component\Core\Model\ChannelInterface

storeHasShippingMethodWithFeePerUnitForChannels() public method

public storeHasShippingMethodWithFeePerUnitForChannels ( $shippingMethodName, $firstFee, Sylius\Component\Core\Model\ChannelInterface $firstChannel, $secondFee, Sylius\Component\Core\Model\ChannelInterface $secondChannel )
$firstChannel Sylius\Component\Core\Model\ChannelInterface
$secondChannel Sylius\Component\Core\Model\ChannelInterface

storeShipsEverythingForFree() public method

public storeShipsEverythingForFree ( Sylius\Component\Addressing\Model\ZoneInterface $zone = null )
$zone Sylius\Component\Addressing\Model\ZoneInterface

theShippingMethodIsDisabled() public method

public theShippingMethodIsDisabled ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod )
$shippingMethod Sylius\Component\Core\Model\ShippingMethodInterface

theShippingMethodIsEnabled() public method

public theShippingMethodIsEnabled ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod )
$shippingMethod Sylius\Component\Core\Model\ShippingMethodInterface

theStoreAllowsShippingMethod() public method

public theStoreAllowsShippingMethod ( $name, $code = null, $position = null )

theStoreAllowsShippingWithAnd() public method

public theStoreAllowsShippingWithAnd ( $firstName, $secondName )

theStoreHasShippingMethodWithFeePerUnit() public method

public theStoreHasShippingMethodWithFeePerUnit ( $shippingMethodName, $fee )

theStoreShipsEverywhereForFree() public method

theStoreShipsEverywhereForFreeForAllChannels() public method

thisShippingMethodIsNamedInLocale() public method

public thisShippingMethodIsNamedInLocale ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod, $name, $locale )
$shippingMethod Sylius\Component\Core\Model\ShippingMethodInterface

thisShippingMethodRequiresAtLeastOneUnitMatchToShippingCategory() public method

public thisShippingMethodRequiresAtLeastOneUnitMatchToShippingCategory ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod, Sylius\Component\Shipping\Model\ShippingCategoryInterface $shippingCategory )
$shippingMethod Sylius\Component\Core\Model\ShippingMethodInterface
$shippingCategory Sylius\Component\Shipping\Model\ShippingCategoryInterface

thisShippingMethodRequiresThatAllUnitsMatchToShippingCategory() public method

public thisShippingMethodRequiresThatAllUnitsMatchToShippingCategory ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod, Sylius\Component\Shipping\Model\ShippingCategoryInterface $shippingCategory )
$shippingMethod Sylius\Component\Core\Model\ShippingMethodInterface
$shippingCategory Sylius\Component\Shipping\Model\ShippingCategoryInterface

thisShippingMethodRequiresThatNoUnitsMatchToShippingCategory() public method

public thisShippingMethodRequiresThatNoUnitsMatchToShippingCategory ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod, Sylius\Component\Shipping\Model\ShippingCategoryInterface $shippingCategory )
$shippingMethod Sylius\Component\Core\Model\ShippingMethodInterface
$shippingCategory Sylius\Component\Shipping\Model\ShippingCategoryInterface