From e9ec260d2d152ad4333091d74639d82f028cd69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Chru=C5=9Bciel?= Date: Wed, 22 Jan 2020 14:53:52 +0100 Subject: [PATCH] [Admin][Channel] Revert #10860 --- app/migrations/Version20191119131635.php | 25 ----------------- .../managing_channels/adding_channel.feature | 1 - .../managing_channels/editing_channel.feature | 9 ------ .../Behat/Context/Setup/ChannelContext.php | 9 ------ .../Ui/Admin/ManagingChannelsContext.php | 26 +---------------- src/Sylius/Behat/Context/Ui/ThemeContext.php | 14 +++++++--- .../Behat/Page/Admin/Channel/CreatePage.php | 8 +----- .../Admin/Channel/CreatePageInterface.php | 2 -- .../Behat/Page/Admin/Channel/IndexPage.php | 28 +++++++++++++++++++ .../Admin/Channel/IndexPageInterface.php} | 16 ++++------- .../Behat/Page/Admin/Channel/UpdatePage.php | 12 -------- .../Admin/Channel/UpdatePageInterface.php | 4 --- .../Resources/config/services/contexts/ui.xml | 1 + .../config/services/pages/admin/channel.xml | 2 +- .../Resources/config/grids/channel.yml | 6 ++-- .../views/Channel/Grid/Field/type.html.twig | 7 ----- .../Resources/views/Channel/_form.html.twig | 7 ++--- .../views/Common/Macro/icons.html.twig | 11 -------- .../Resources/views/Common/_channel.html.twig | 6 +--- .../ChannelBundle/Form/Type/ChannelType.php | 11 -------- .../config/doctrine/model/Channel.orm.xml | 1 - .../Resources/translations/messages.en.yml | 7 ----- .../Component/Channel/Model/Channel.php | 13 --------- .../Channel/Model/ChannelInterface.php | 4 --- .../Channel/spec/Model/ChannelSpec.php | 6 ---- .../create_validation_fail_response.json | 1 - .../update_validation_fail_response.json | 1 - 27 files changed, 54 insertions(+), 184 deletions(-) delete mode 100644 app/migrations/Version20191119131635.php create mode 100644 src/Sylius/Behat/Page/Admin/Channel/IndexPage.php rename src/Sylius/{Component/Channel/Model/ChannelTypes.php => Behat/Page/Admin/Channel/IndexPageInterface.php} (50%) delete mode 100644 src/Sylius/Bundle/AdminBundle/Resources/views/Channel/Grid/Field/type.html.twig delete mode 100644 src/Sylius/Bundle/AdminBundle/Resources/views/Common/Macro/icons.html.twig diff --git a/app/migrations/Version20191119131635.php b/app/migrations/Version20191119131635.php deleted file mode 100644 index 4c0c8fa3b82..00000000000 --- a/app/migrations/Version20191119131635.php +++ /dev/null @@ -1,25 +0,0 @@ -abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); - - $this->addSql('ALTER TABLE sylius_channel ADD type VARCHAR(255) DEFAULT NULL'); - } - - public function down(Schema $schema): void - { - $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); - - $this->addSql('ALTER TABLE sylius_channel DROP type'); - } -} diff --git a/features/channel/managing_channels/adding_channel.feature b/features/channel/managing_channels/adding_channel.feature index cd3ce9d0420..c229b3295de 100644 --- a/features/channel/managing_channels/adding_channel.feature +++ b/features/channel/managing_channels/adding_channel.feature @@ -29,7 +29,6 @@ Feature: Adding a new channel And I set its hostname as "m.avengers-gear.com" And I set its contact email as "contact@avengers-gear.com" And I define its color as "blue" - And I define its type as mobile And I choose "Euro" as the base currency And I choose "English (United States)" as a default locale And I allow to skip shipping step if only one shipping method is available diff --git a/features/channel/managing_channels/editing_channel.feature b/features/channel/managing_channels/editing_channel.feature index a895dbd8279..825342a205e 100644 --- a/features/channel/managing_channels/editing_channel.feature +++ b/features/channel/managing_channels/editing_channel.feature @@ -33,12 +33,3 @@ Feature: Editing channel Scenario: Seeing disabled base currency field during channel edition When I want to modify a channel "Web Channel" Then the base currency field should be disabled - - @ui - Scenario: Changing type of channel - Given the channel "Web Channel" with a mobile type - When I want to modify a channel "Web Channel" - And I change its type to website - And I save my changes - Then I should be notified that it has been successfully edited - And this channel type should be website diff --git a/src/Sylius/Behat/Context/Setup/ChannelContext.php b/src/Sylius/Behat/Context/Setup/ChannelContext.php index 1f352e6886d..9ef71ee1783 100644 --- a/src/Sylius/Behat/Context/Setup/ChannelContext.php +++ b/src/Sylius/Behat/Context/Setup/ChannelContext.php @@ -217,15 +217,6 @@ public function channelBillingDataIs( $this->channelManager->flush(); } - /** - * @Given /^the (channel "[^"]+") with a (mobile|website|pos) type$/ - */ - public function theChannelIsAType(ChannelInterface $channel, string $type): void - { - $channel->setType($type); - - $this->channelManager->flush(); - } /** * @Given channel :channel has menu taxon :taxon diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php index 276addd64ee..b4ebae1ce80 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php @@ -16,8 +16,8 @@ use Behat\Behat\Context\Context; use Sylius\Behat\NotificationType; use Sylius\Behat\Page\Admin\Channel\CreatePageInterface; +use Sylius\Behat\Page\Admin\Channel\IndexPageInterface; use Sylius\Behat\Page\Admin\Channel\UpdatePageInterface; -use Sylius\Behat\Page\Admin\Crud\IndexPageInterface; use Sylius\Behat\Service\NotificationCheckerInterface; use Sylius\Behat\Service\Resolver\CurrentPageResolverInterface; use Sylius\Component\Core\Formatter\StringInflector; @@ -282,14 +282,6 @@ public function iSaveMyChanges() $this->updatePage->saveChanges(); } - /** - * @When /^I define its type as (mobile|website|pos)$/ - */ - public function iDefineItsTypeAs(string $type): void - { - $this->createPage->setType($type); - } - /** * @Then I should be notified that channel with this code already exists */ @@ -477,14 +469,6 @@ public function theDefaultTaxZoneForTheChannelShouldBe(ChannelInterface $channel Assert::true($this->updatePage->isDefaultTaxZoneChosen($taxZone)); } - /** - * @When /^I change its type to (mobile|website|pos)$/ - */ - public function iChangeItsTypeTo(string $type): void - { - $this->updatePage->changeType($type); - } - /** * @Given channel :channel should not have default tax zone */ @@ -524,14 +508,6 @@ public function iShouldBeNotifiedThatTheDefaultLocaleHasToBeEnabled(): void ); } - /** - * @Then /^this channel type should be (mobile|website|pos)$/ - */ - public function thisChannelTypeShouldBe(string $type): void - { - Assert::same($this->updatePage->getType(), $type); - } - /** * @Given /^(this channel) menu taxon should be "([^"]+)"$/ * @Given the channel :channel should have :menuTaxon as a menu taxon diff --git a/src/Sylius/Behat/Context/Ui/ThemeContext.php b/src/Sylius/Behat/Context/Ui/ThemeContext.php index f0db6ca5922..a89af5ad7d2 100644 --- a/src/Sylius/Behat/Context/Ui/ThemeContext.php +++ b/src/Sylius/Behat/Context/Ui/ThemeContext.php @@ -14,6 +14,7 @@ namespace Sylius\Behat\Context\Ui; use Behat\Behat\Context\Context; +use Sylius\Behat\Page\Admin\Channel\IndexPageInterface; use Sylius\Behat\Page\Admin\Channel\UpdatePageInterface; use Sylius\Behat\Page\Shop\HomePageInterface; use Sylius\Behat\Service\SharedStorageInterface; @@ -26,6 +27,9 @@ final class ThemeContext implements Context /** @var SharedStorageInterface */ private $sharedStorage; + /** @var IndexPageInterface */ + private $channelIndexPage; + /** @var UpdatePageInterface */ private $channelUpdatePage; @@ -34,10 +38,12 @@ final class ThemeContext implements Context public function __construct( SharedStorageInterface $sharedStorage, + IndexPageInterface $channelIndexPage, UpdatePageInterface $channelUpdatePage, HomePageInterface $homePage ) { $this->sharedStorage = $sharedStorage; + $this->channelIndexPage = $channelIndexPage; $this->channelUpdatePage = $channelUpdatePage; $this->homePage = $homePage; } @@ -70,9 +76,9 @@ public function iUnsetThemeOnChannel(ChannelInterface $channel) */ public function channelShouldNotUseAnyTheme(ChannelInterface $channel) { - $this->channelUpdatePage->open(['id' => $channel->getId()]); + $this->channelIndexPage->open(); - Assert::isEmpty($this->channelUpdatePage->getUsedTheme($channel->getCode())); + Assert::same($this->channelIndexPage->getUsedThemeName($channel->getCode()), 'Default'); } /** @@ -80,9 +86,9 @@ public function channelShouldNotUseAnyTheme(ChannelInterface $channel) */ public function channelShouldUseTheme(ChannelInterface $channel, ThemeInterface $theme) { - $this->channelUpdatePage->open(['id' => $channel->getId()]); + $this->channelIndexPage->open(); - Assert::same($this->channelUpdatePage->getUsedTheme($channel->getCode()), $theme->getName()); + Assert::same($this->channelIndexPage->getUsedThemeName($channel->getCode()), $theme->getName()); } /** diff --git a/src/Sylius/Behat/Page/Admin/Channel/CreatePage.php b/src/Sylius/Behat/Page/Admin/Channel/CreatePage.php index e8d89da7f8f..4e7b5518a6c 100644 --- a/src/Sylius/Behat/Page/Admin/Channel/CreatePage.php +++ b/src/Sylius/Behat/Page/Admin/Channel/CreatePage.php @@ -88,11 +88,6 @@ public function allowToSkipPaymentStep(): void $this->getDocument()->checkField('Skip payment step if only one payment method is available?'); } - public function setType(string $type): void - { - $this->getElement('type')->selectOption($type); - } - public function specifyMenuTaxon(string $menuTaxon): void { $menuTaxonElement = $this->getElement('menu_taxon')->getParent(); @@ -108,15 +103,14 @@ protected function getToggleableElement(): NodeElement protected function getDefinedElements(): array { return array_merge(parent::getDefinedElements(), [ - 'base_currency' => '#sylius_channel_baseCurrency', 'code' => '#sylius_channel_code', 'currencies' => '#sylius_channel_currencies', + 'base_currency' => '#sylius_channel_baseCurrency', 'default_locale' => '#sylius_channel_defaultLocale', 'enabled' => '#sylius_channel_enabled', 'locales' => '#sylius_channel_locales', 'menu_taxon' => '#sylius_channel_menuTaxon', 'name' => '#sylius_channel_name', - 'type' => '#sylius_channel_type', ]); } } diff --git a/src/Sylius/Behat/Page/Admin/Channel/CreatePageInterface.php b/src/Sylius/Behat/Page/Admin/Channel/CreatePageInterface.php index 4009765653a..5b201f1f5f9 100644 --- a/src/Sylius/Behat/Page/Admin/Channel/CreatePageInterface.php +++ b/src/Sylius/Behat/Page/Admin/Channel/CreatePageInterface.php @@ -49,7 +49,5 @@ public function allowToSkipShippingStep(): void; public function allowToSkipPaymentStep(): void; - public function setType(string $type): void; - public function specifyMenuTaxon(string $menuTaxon): void; } diff --git a/src/Sylius/Behat/Page/Admin/Channel/IndexPage.php b/src/Sylius/Behat/Page/Admin/Channel/IndexPage.php new file mode 100644 index 00000000000..8bd9d9a6225 --- /dev/null +++ b/src/Sylius/Behat/Page/Admin/Channel/IndexPage.php @@ -0,0 +1,28 @@ +getDocument()->find('css', 'table'); + + $row = $this->getTableAccessor()->getRowWithFields($table, ['code' => $channelCode]); + + return trim($this->getTableAccessor()->getFieldFromRow($table, $row, 'themeName')->getText()); + } +} diff --git a/src/Sylius/Component/Channel/Model/ChannelTypes.php b/src/Sylius/Behat/Page/Admin/Channel/IndexPageInterface.php similarity index 50% rename from src/Sylius/Component/Channel/Model/ChannelTypes.php rename to src/Sylius/Behat/Page/Admin/Channel/IndexPageInterface.php index 14bee003770..9c777583b2a 100644 --- a/src/Sylius/Component/Channel/Model/ChannelTypes.php +++ b/src/Sylius/Behat/Page/Admin/Channel/IndexPageInterface.php @@ -11,17 +11,11 @@ declare(strict_types=1); -namespace Sylius\Component\Channel\Model; +namespace Sylius\Behat\Page\Admin\Channel; -final class ChannelTypes -{ - public const TYPE_WEBSITE = 'website'; - - public const TYPE_MOBILE = 'mobile'; +use Sylius\Behat\Page\Admin\Crud\IndexPageInterface as BaseIndexPageInterface; - public const TYPE_POS = 'pos'; - - private function __construct() - { - } +interface IndexPageInterface extends BaseIndexPageInterface +{ + public function getUsedThemeName(string $channelCode): ?string; } diff --git a/src/Sylius/Behat/Page/Admin/Channel/UpdatePage.php b/src/Sylius/Behat/Page/Admin/Channel/UpdatePage.php index 306631edd89..bc71d361349 100644 --- a/src/Sylius/Behat/Page/Admin/Channel/UpdatePage.php +++ b/src/Sylius/Behat/Page/Admin/Channel/UpdatePage.php @@ -88,16 +88,6 @@ public function isBaseCurrencyDisabled(): bool return $this->getElement('base_currency')->hasAttribute('disabled'); } - public function changeType(string $type): void - { - $this->getElement('type')->selectOption($type); - } - - public function getType(): string - { - return $this->getElement('type')->getValue(); - } - public function changeMenuTaxon(string $menuTaxon): void { $menuTaxonElement = $this->getElement('menu_taxon')->getParent(); @@ -138,8 +128,6 @@ protected function getDefinedElements(): array 'menu_taxon' => '#sylius_channel_menuTaxon', 'name' => '#sylius_channel_name', 'tax_calculation_strategy' => '#sylius_channel_taxCalculationStrategy', - 'theme' => '#sylius_channel_themeName', - 'type' => '#sylius_channel_type', ]); } } diff --git a/src/Sylius/Behat/Page/Admin/Channel/UpdatePageInterface.php b/src/Sylius/Behat/Page/Admin/Channel/UpdatePageInterface.php index e004b86ead5..d44c1344bab 100644 --- a/src/Sylius/Behat/Page/Admin/Channel/UpdatePageInterface.php +++ b/src/Sylius/Behat/Page/Admin/Channel/UpdatePageInterface.php @@ -51,10 +51,6 @@ public function isTaxCalculationStrategyChosen(string $taxCalculationStrategy): public function isBaseCurrencyDisabled(): bool; - public function changeType(string $type): void; - - public function getType(): string; - public function changeMenuTaxon(string $menuTaxon): void; public function getMenuTaxon(): string; diff --git a/src/Sylius/Behat/Resources/config/services/contexts/ui.xml b/src/Sylius/Behat/Resources/config/services/contexts/ui.xml index f40a95bedf9..d19e1884199 100644 --- a/src/Sylius/Behat/Resources/config/services/contexts/ui.xml +++ b/src/Sylius/Behat/Resources/config/services/contexts/ui.xml @@ -366,6 +366,7 @@ + diff --git a/src/Sylius/Behat/Resources/config/services/pages/admin/channel.xml b/src/Sylius/Behat/Resources/config/services/pages/admin/channel.xml index c0a0fcb6aca..d4365ab9062 100644 --- a/src/Sylius/Behat/Resources/config/services/pages/admin/channel.xml +++ b/src/Sylius/Behat/Resources/config/services/pages/admin/channel.xml @@ -14,8 +14,8 @@ Sylius\Behat\Page\Admin\Channel\CreatePage - %sylius.behat.page.admin.crud.index.class% Sylius\Behat\Page\Admin\Channel\UpdatePage + Sylius\Behat\Page\Admin\Channel\IndexPage diff --git a/src/Sylius/Bundle/AdminBundle/Resources/config/grids/channel.yml b/src/Sylius/Bundle/AdminBundle/Resources/config/grids/channel.yml index d0cf0105cd6..5b175ad5082 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/config/grids/channel.yml +++ b/src/Sylius/Bundle/AdminBundle/Resources/config/grids/channel.yml @@ -22,12 +22,12 @@ sylius_grid: sortable: code options: template: "@SyliusAdmin/Channel/Grid/Field/code.html.twig" - type: + themeName: type: twig - label: sylius.form.channel.type + label: sylius.ui.theme sortable: ~ options: - template: "@SyliusAdmin/Channel/Grid/Field/type.html.twig" + template: "@SyliusAdmin/Channel/Grid/Field/themeName.html.twig" enabled: type: twig label: sylius.ui.enabled diff --git a/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/Grid/Field/type.html.twig b/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/Grid/Field/type.html.twig deleted file mode 100644 index c1369039c85..00000000000 --- a/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/Grid/Field/type.html.twig +++ /dev/null @@ -1,7 +0,0 @@ -{% import '@SyliusAdmin/Common/Macro/icons.html.twig' as icons %} - -{% if data is not empty %} - - {{ icons.channelType(data)}} {{ ('sylius.ui.channel.types.' ~ data)|trans }} - -{% endif %} diff --git a/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/_form.html.twig b/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/_form.html.twig index 6d76e2b376b..85bfcbe20fb 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/_form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/_form.html.twig @@ -5,14 +5,13 @@
{{ form_errors(form) }}
-
+
{{ form_row(form.code) }}
-
+
{{ form_row(form.name) }}
-
{{ form_row(form.type) }}
-
+
{{ form_row(form.color) }}
diff --git a/src/Sylius/Bundle/AdminBundle/Resources/views/Common/Macro/icons.html.twig b/src/Sylius/Bundle/AdminBundle/Resources/views/Common/Macro/icons.html.twig deleted file mode 100644 index 03ff42d1559..00000000000 --- a/src/Sylius/Bundle/AdminBundle/Resources/views/Common/Macro/icons.html.twig +++ /dev/null @@ -1,11 +0,0 @@ -{% macro channelType(type) %} - {% - set icons = { - mobile: 'mobile alternate', - website: 'desktop', - pos: 'map pin', - } - %} - - -{% endmacro %} diff --git a/src/Sylius/Bundle/AdminBundle/Resources/views/Common/_channel.html.twig b/src/Sylius/Bundle/AdminBundle/Resources/views/Common/_channel.html.twig index d263fbc8df7..3aaa9148f79 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/views/Common/_channel.html.twig +++ b/src/Sylius/Bundle/AdminBundle/Resources/views/Common/_channel.html.twig @@ -1,11 +1,7 @@ -{% import '@SyliusAdmin/Common/Macro/icons.html.twig' as icons %} - {% if channel is defined %}
- {% if channel.type is not empty %} - {{ icons.channelType(channel.type) }} - {% endif %} + {{ channel.name|default(channel.code) }} diff --git a/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelType.php b/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelType.php index f9c24addf70..19ed988481a 100644 --- a/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelType.php +++ b/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelType.php @@ -15,9 +15,7 @@ use Sylius\Bundle\ResourceBundle\Form\EventSubscriber\AddCodeFormSubscriber; use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; -use Sylius\Component\Channel\Model\ChannelTypes; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\ColorType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\Extension\Core\Type\TextType; @@ -51,15 +49,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'label' => 'sylius.form.channel.color', 'required' => false, ]) - ->add('type', ChoiceType::class, [ - 'label' => 'sylius.form.channel.type', - 'required' => false, - 'choices' => [ - 'sylius.ui.channel.types.website' => ChannelTypes::TYPE_WEBSITE, - 'sylius.ui.channel.types.mobile' => ChannelTypes::TYPE_MOBILE, - 'sylius.ui.channel.types.pos' => ChannelTypes::TYPE_POS, - ], - ]) ; } diff --git a/src/Sylius/Bundle/ChannelBundle/Resources/config/doctrine/model/Channel.orm.xml b/src/Sylius/Bundle/ChannelBundle/Resources/config/doctrine/model/Channel.orm.xml index bb88168b0bd..ab8c54a9db1 100644 --- a/src/Sylius/Bundle/ChannelBundle/Resources/config/doctrine/model/Channel.orm.xml +++ b/src/Sylius/Bundle/ChannelBundle/Resources/config/doctrine/model/Channel.orm.xml @@ -28,7 +28,6 @@ - diff --git a/src/Sylius/Bundle/ChannelBundle/Resources/translations/messages.en.yml b/src/Sylius/Bundle/ChannelBundle/Resources/translations/messages.en.yml index 2cabac406a4..3d765e5753b 100644 --- a/src/Sylius/Bundle/ChannelBundle/Resources/translations/messages.en.yml +++ b/src/Sylius/Bundle/ChannelBundle/Resources/translations/messages.en.yml @@ -6,10 +6,3 @@ sylius: enabled: Enabled name: Name url: URL - type: Type - ui: - channel: - types: - website: Website - mobile: Mobile - pos: POS diff --git a/src/Sylius/Component/Channel/Model/Channel.php b/src/Sylius/Component/Channel/Model/Channel.php index 97fe8e406e9..c96e90d354b 100644 --- a/src/Sylius/Component/Channel/Model/Channel.php +++ b/src/Sylius/Component/Channel/Model/Channel.php @@ -38,9 +38,6 @@ class Channel implements ChannelInterface /** @var string|null */ protected $color; - /** @var string|null */ - protected $type; - public function __construct() { $this->createdAt = new \DateTime(); @@ -138,14 +135,4 @@ public function setColor(?string $color): void { $this->color = $color; } - - public function getType(): ?string - { - return $this->type; - } - - public function setType(?string $type): void - { - $this->type = $type; - } } diff --git a/src/Sylius/Component/Channel/Model/ChannelInterface.php b/src/Sylius/Component/Channel/Model/ChannelInterface.php index 9c897df25e3..0d7955174e5 100644 --- a/src/Sylius/Component/Channel/Model/ChannelInterface.php +++ b/src/Sylius/Component/Channel/Model/ChannelInterface.php @@ -39,8 +39,4 @@ public function setHostname(?string $hostname): void; public function getColor(): ?string; public function setColor(?string $color): void; - - public function getType(): ?string; - - public function setType(?string $type): void; } diff --git a/src/Sylius/Component/Channel/spec/Model/ChannelSpec.php b/src/Sylius/Component/Channel/spec/Model/ChannelSpec.php index 62bed1d5f53..a18436c5941 100644 --- a/src/Sylius/Component/Channel/spec/Model/ChannelSpec.php +++ b/src/Sylius/Component/Channel/spec/Model/ChannelSpec.php @@ -94,10 +94,4 @@ function its_last_update_date_is_mutable(\DateTime $date): void $this->setUpdatedAt($date); $this->getUpdatedAt()->shouldReturn($date); } - - function its_type_is_mutable(): void - { - $this->setType('mobile'); - $this->getType()->shouldReturn('mobile'); - } } diff --git a/tests/Responses/Expected/channel/create_validation_fail_response.json b/tests/Responses/Expected/channel/create_validation_fail_response.json index 100a2be8d73..506b24d8bfd 100644 --- a/tests/Responses/Expected/channel/create_validation_fail_response.json +++ b/tests/Responses/Expected/channel/create_validation_fail_response.json @@ -8,7 +8,6 @@ "Please enter channel name." ] }, - "type": {}, "description": {}, "enabled": { "errors": [ diff --git a/tests/Responses/Expected/channel/update_validation_fail_response.json b/tests/Responses/Expected/channel/update_validation_fail_response.json index b0615675065..c1abcbc2b1d 100644 --- a/tests/Responses/Expected/channel/update_validation_fail_response.json +++ b/tests/Responses/Expected/channel/update_validation_fail_response.json @@ -8,7 +8,6 @@ "Please enter channel name." ] }, - "type": {}, "description": {}, "enabled": {}, "hostname": {},