PHP Class Sylius\Behat\Context\Ui\Admin\ManagingPromotionsContext

Author: Mateusz Zalewski ([email protected])
Inheritance: implements Behat\Behat\Context\Context
Afficher le fichier Open project: sylius/sylius

Méthodes publiques

Méthode Description
__construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Behat\Page\Admin\Promotion\IndexPageInterface $indexPage, Sylius\Behat\Page\Admin\Promotion\CreatePageInterface $createPage, Sylius\Behat\Page\Admin\Promotion\UpdatePageInterface $updatePage, Sylius\Behat\Service\Resolver\CurrentPageResolverInterface $currentPageResolver, Sylius\Behat\Service\NotificationCheckerInterface $notificationChecker, Sylius\Component\Currency\Provider\CurrencyProviderInterface $currencyProvider )
iAddAMaxPriceFilterRangeForChannel ( $channelName, $maximum )
iAddAMinMaxPriceFilterRangeForChannel ( $channelName, $minimum, $maximum )
iAddAMinPriceFilterRangeForChannel ( $channelName, $minimum )
iAddIt ( )
iAddTheAction ( $actionType )
iAddTheActionConfiguredWithAPercentageValue ( $actionType, $percentage = null )
iAddTheActionConfiguredWithAPercentageValueForChannel ( $actionType, $percentage = null, $channelName )
iAddTheActionConfiguredWithAmountForChannel ( $actionType, $amount, $channelName )
iAddTheHasTaxonRuleConfiguredWith ( $taxons )
iAddTheItemTotalRuleConfiguredWithTwoChannel ( $firstAmount, $firstChannelName, $secondAmount, $secondChannelName )
iAddTheRuleConfiguredWith ( $taxonName, $amount, $channelName )
iAddTheRuleConfiguredWithTheProduct ( $productName )
iDeletePromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
iMakeItApplicableForTheChannel ( $channelName )
iMakeItAvailableFromTo ( DateTime $startsDate, DateTime $endsDate )
iMakeItCouponBased ( )
iMakeItExclusive ( )
iNameIt ( $name = null )
iSaveMyChanges ( )
iSetItsUsageLimitTo ( $usageLimit )
iShouldBeAbleToManageCouponsForThisPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
iShouldBeNotifiedOfFailure ( )
iShouldBeNotifiedThatAMinimalValueShouldBeNumeric ( $element )
iShouldBeNotifiedThatAPercentageDiscountValueMustBeAtLeast0 ( )
iShouldBeNotifiedThatIsRequired ( $element )
iShouldBeNotifiedThatPromotionCannotEndBeforeItsEvenStart ( )
iShouldBeNotifiedThatPromotionWithThisCodeAlreadyExists ( )
iShouldBeNotifiedThatTheMaximumValueOfAPercentageDiscountIs100 ( )
iShouldBeNotifiedThatThisValueShouldNotBeBlank ( )
iShouldSeePromotionsOnTheList ( $count )
iSpecifyItsCodeAs ( $code = null )
iSpecifyThatThisActionShouldBeAppliedToItemsFromCategory ( $taxonName )
iSpecifyThatThisActionShouldBeAppliedToTheProduct ( $productName )
iWantToBrowsePromotions ( )
iWantToCreateANewPromotion ( )
iWantToModifyAPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
itIsConfiguredWithAmountForChannel ( $amount, $channelName )
promotionShouldNotExistInTheRegistry ( Sylius\Component\Core\Model\PromotionInterface $promotion )
promotionWithElementValueShouldNotBeAdded ( $element, $name )
theCodeFieldShouldBeDisabled ( )
theFirstPromotionOnTheListShouldHave ( $field, $value )
theLastPromotionOnTheListShouldHave ( $field, $value )
thePromotionShouldAppearInTheRegistry ( $promotionName )
thePromotionShouldBeApplicableForTheChannel ( Sylius\Component\Core\Model\PromotionInterface $promotion, $channelName )
thePromotionShouldBeAvailableFromTo ( Sylius\Component\Core\Model\PromotionInterface $promotion, DateTime $startsDate, DateTime $endsDate )
thePromotionShouldBeAvailableToUseOnlyTimes ( Sylius\Component\Core\Model\PromotionInterface $promotion, $usageLimit )
thePromotionShouldBeCouponBased ( Sylius\Component\Core\Model\PromotionInterface $promotion )
thePromotionShouldBeExclusive ( Sylius\Component\Core\Model\PromotionInterface $promotion )
thePromotionShouldBeUsedTime ( Sylius\Component\Core\Model\PromotionInterface $promotion, $usage )
thereShouldBePromotion ( $number )
thereShouldStillBeOnlyOnePromotionWith ( $element, $value )
thisPromotionShouldBeCouponBased ( Sylius\Component\Core\Model\PromotionInterface $promotion )

Private Methods

Méthode Description
assertFieldValidationMessage ( string $element, string $expectedMessage )
assertIfFieldIsTrue ( Sylius\Component\Core\Model\PromotionInterface $promotion, string $field )

Method Details

__construct() public méthode

public __construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Behat\Page\Admin\Promotion\IndexPageInterface $indexPage, Sylius\Behat\Page\Admin\Promotion\CreatePageInterface $createPage, Sylius\Behat\Page\Admin\Promotion\UpdatePageInterface $updatePage, Sylius\Behat\Service\Resolver\CurrentPageResolverInterface $currentPageResolver, Sylius\Behat\Service\NotificationCheckerInterface $notificationChecker, Sylius\Component\Currency\Provider\CurrencyProviderInterface $currencyProvider )
$sharedStorage Sylius\Behat\Service\SharedStorageInterface
$indexPage Sylius\Behat\Page\Admin\Promotion\IndexPageInterface
$createPage Sylius\Behat\Page\Admin\Promotion\CreatePageInterface
$updatePage Sylius\Behat\Page\Admin\Promotion\UpdatePageInterface
$currentPageResolver Sylius\Behat\Service\Resolver\CurrentPageResolverInterface
$notificationChecker Sylius\Behat\Service\NotificationCheckerInterface
$currencyProvider Sylius\Component\Currency\Provider\CurrencyProviderInterface

iAddAMaxPriceFilterRangeForChannel() public méthode

public iAddAMaxPriceFilterRangeForChannel ( $channelName, $maximum )

iAddAMinMaxPriceFilterRangeForChannel() public méthode

public iAddAMinMaxPriceFilterRangeForChannel ( $channelName, $minimum, $maximum )

iAddAMinPriceFilterRangeForChannel() public méthode

public iAddAMinPriceFilterRangeForChannel ( $channelName, $minimum )

iAddIt() public méthode

public iAddIt ( )

iAddTheAction() public méthode

public iAddTheAction ( $actionType )

iAddTheActionConfiguredWithAPercentageValue() public méthode

public iAddTheActionConfiguredWithAPercentageValue ( $actionType, $percentage = null )

iAddTheActionConfiguredWithAPercentageValueForChannel() public méthode

public iAddTheActionConfiguredWithAPercentageValueForChannel ( $actionType, $percentage = null, $channelName )

iAddTheActionConfiguredWithAmountForChannel() public méthode

public iAddTheActionConfiguredWithAmountForChannel ( $actionType, $amount, $channelName )

iAddTheHasTaxonRuleConfiguredWith() public méthode

iAddTheItemTotalRuleConfiguredWithTwoChannel() public méthode

public iAddTheItemTotalRuleConfiguredWithTwoChannel ( $firstAmount, $firstChannelName, $secondAmount, $secondChannelName )

iAddTheRuleConfiguredWith() public méthode

public iAddTheRuleConfiguredWith ( $taxonName, $amount, $channelName )

iAddTheRuleConfiguredWithTheProduct() public méthode

public iAddTheRuleConfiguredWithTheProduct ( $productName )

iDeletePromotion() public méthode

public iDeletePromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

iMakeItApplicableForTheChannel() public méthode

public iMakeItApplicableForTheChannel ( $channelName )

iMakeItAvailableFromTo() public méthode

public iMakeItAvailableFromTo ( DateTime $startsDate, DateTime $endsDate )
$startsDate DateTime
$endsDate DateTime

iMakeItCouponBased() public méthode

public iMakeItCouponBased ( )

iMakeItExclusive() public méthode

public iMakeItExclusive ( )

iNameIt() public méthode

public iNameIt ( $name = null )

iSaveMyChanges() public méthode

public iSaveMyChanges ( )

iSetItsUsageLimitTo() public méthode

public iSetItsUsageLimitTo ( $usageLimit )

iShouldBeAbleToManageCouponsForThisPromotion() public méthode

public iShouldBeAbleToManageCouponsForThisPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

iShouldBeNotifiedOfFailure() public méthode

iShouldBeNotifiedThatAMinimalValueShouldBeNumeric() public méthode

iShouldBeNotifiedThatAPercentageDiscountValueMustBeAtLeast0() public méthode

iShouldBeNotifiedThatIsRequired() public méthode

public iShouldBeNotifiedThatIsRequired ( $element )

iShouldBeNotifiedThatPromotionCannotEndBeforeItsEvenStart() public méthode

iShouldBeNotifiedThatPromotionWithThisCodeAlreadyExists() public méthode

iShouldBeNotifiedThatTheMaximumValueOfAPercentageDiscountIs100() public méthode

iShouldBeNotifiedThatThisValueShouldNotBeBlank() public méthode

iShouldSeePromotionsOnTheList() public méthode

public iShouldSeePromotionsOnTheList ( $count )

iSpecifyItsCodeAs() public méthode

public iSpecifyItsCodeAs ( $code = null )

iSpecifyThatThisActionShouldBeAppliedToItemsFromCategory() public méthode

iSpecifyThatThisActionShouldBeAppliedToTheProduct() public méthode

iWantToBrowsePromotions() public méthode

iWantToCreateANewPromotion() public méthode

iWantToModifyAPromotion() public méthode

public iWantToModifyAPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

itIsConfiguredWithAmountForChannel() public méthode

public itIsConfiguredWithAmountForChannel ( $amount, $channelName )

promotionShouldNotExistInTheRegistry() public méthode

public promotionShouldNotExistInTheRegistry ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

promotionWithElementValueShouldNotBeAdded() public méthode

public promotionWithElementValueShouldNotBeAdded ( $element, $name )

theCodeFieldShouldBeDisabled() public méthode

theFirstPromotionOnTheListShouldHave() public méthode

public theFirstPromotionOnTheListShouldHave ( $field, $value )

theLastPromotionOnTheListShouldHave() public méthode

public theLastPromotionOnTheListShouldHave ( $field, $value )

thePromotionShouldAppearInTheRegistry() public méthode

public thePromotionShouldAppearInTheRegistry ( $promotionName )

thePromotionShouldBeApplicableForTheChannel() public méthode

public thePromotionShouldBeApplicableForTheChannel ( Sylius\Component\Core\Model\PromotionInterface $promotion, $channelName )
$promotion Sylius\Component\Core\Model\PromotionInterface

thePromotionShouldBeAvailableFromTo() public méthode

public thePromotionShouldBeAvailableFromTo ( Sylius\Component\Core\Model\PromotionInterface $promotion, DateTime $startsDate, DateTime $endsDate )
$promotion Sylius\Component\Core\Model\PromotionInterface
$startsDate DateTime
$endsDate DateTime

thePromotionShouldBeAvailableToUseOnlyTimes() public méthode

public thePromotionShouldBeAvailableToUseOnlyTimes ( Sylius\Component\Core\Model\PromotionInterface $promotion, $usageLimit )
$promotion Sylius\Component\Core\Model\PromotionInterface

thePromotionShouldBeCouponBased() public méthode

public thePromotionShouldBeCouponBased ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

thePromotionShouldBeExclusive() public méthode

public thePromotionShouldBeExclusive ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

thePromotionShouldBeUsedTime() public méthode

public thePromotionShouldBeUsedTime ( Sylius\Component\Core\Model\PromotionInterface $promotion, $usage )
$promotion Sylius\Component\Core\Model\PromotionInterface

thereShouldBePromotion() public méthode

public thereShouldBePromotion ( $number )

thereShouldStillBeOnlyOnePromotionWith() public méthode

public thereShouldStillBeOnlyOnePromotionWith ( $element, $value )

thisPromotionShouldBeCouponBased() public méthode

public thisPromotionShouldBeCouponBased ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface