From 5f52f3aa401b208b6671c60e7d89e51aea8f77b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20J=C4=99drzejewski?= Date: Thu, 21 May 2015 22:29:19 +0200 Subject: [PATCH] Scenario fixes --- behat.yml.dist | 1 + features/reports/reports.feature | 1 + .../Bundle/ChannelBundle/DependencyInjection/Configuration.php | 2 +- .../DependencyInjection/SyliusChannelExtension.php | 2 +- .../Bundle/CoreBundle/Form/Type/Checkout/ShipmentType.php | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/behat.yml.dist b/behat.yml.dist index 385712fec7..980821f7d3 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -407,6 +407,7 @@ default: - Sylius\Bundle\ResourceBundle\Behat\BaseContext - Sylius\Bundle\WebBundle\Behat\WebContext - Sylius\Bundle\MailerBundle\Behat\MailerContext + - Sylius\Bundle\ChannelBundle\Behat\ChannelContext filters: tags: "@emails && ~@javascript" security: diff --git a/features/reports/reports.feature b/features/reports/reports.feature index fee3c418b2..d6cf00833a 100644 --- a/features/reports/reports.feature +++ b/features/reports/reports.feature @@ -10,6 +10,7 @@ Feature: Reports | TableReport | Lorem ipsum | table_report | table | Template:SyliusReportBundle:Table:default.html.twig | user_registration | Period:day,Start:2010-01-01,End:2010-04-01 | | BarChartReport | Lorem ipsum | bar_chart_report | chart | Type:bar,Template:SyliusReportBundle:Chart:default.html.twig | user_registration | Period:month,Start:2010-01-01,End:2010-04-01 | And there is default currency configured + And there is default channel configured And there are following users: | email | enabled | created at | | beth@foo.com | yes | 2010-01-02 12:00:00 | diff --git a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php index eb29a3bd62..45fb2c9c24 100644 --- a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php @@ -90,7 +90,7 @@ class Configuration implements ConfigurationInterface ->addDefaultsIfNotSet() ->children() ->scalarNode('default')->defaultValue('Sylius\Bundle\ChannelBundle\Form\Type\ChannelType')->end() - ->scalarNode('choice')->end() + ->scalarNode('choice')->defaultValue('%sylius.form.type.resource_choice.class%')->end() ->end() ->end() ->end() diff --git a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/SyliusChannelExtension.php b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/SyliusChannelExtension.php index fb20852d23..84373ecebe 100644 --- a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/SyliusChannelExtension.php +++ b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/SyliusChannelExtension.php @@ -26,6 +26,6 @@ class SyliusChannelExtension extends AbstractResourceExtension */ public function load(array $config, ContainerBuilder $container) { - $this->configure($config, new Configuration(), $container, self::CONFIGURE_LOADER | self::CONFIGURE_DATABASE | self::CONFIGURE_PARAMETERS | self::CONFIGURE_VALIDATORS); + $this->configure($config, new Configuration(), $container, self::CONFIGURE_LOADER | self::CONFIGURE_DATABASE | self::CONFIGURE_PARAMETERS | self::CONFIGURE_VALIDATORS | self::CONFIGURE_FORMS); } } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/ShipmentType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/ShipmentType.php index b7225af90d..3566340a4a 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/ShipmentType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/ShipmentType.php @@ -43,7 +43,7 @@ class ShipmentType extends AbstractType $criteria = $options['criteria']; $channel = $options['channel']; - $notBlank = new NotBlank(); + $notBlank = new NotBlank(array('groups' => array('sylius'))); $notBlank->message = $this->translator->trans('sylius.checkout.shipping_method.not_blank'); $builder