From b47b0982cd0d110c93465a1fc1a09fcd188f4cae Mon Sep 17 00:00:00 2001 From: Manu Gonzalez Rodriguez Date: Tue, 10 Oct 2017 13:13:14 +0200 Subject: [PATCH 1/4] MassAction fix --- .../Magento/Framework/Data/Form/Element/Multiselect.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php index 6e9b598cc8f4d..b5d5352d642b9 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php @@ -57,10 +57,10 @@ public function getElementHtml() $this->addClass('select multiselect admin__control-multiselect'); $html = ''; if ($this->getCanBeEmpty()) { - $html .= ''; + $html .= ''; } if (!empty($this->_data['disabled'])) { - $html .= ''; + $html .= ''; } $html .= 'assertContains('_model->setDisabled(true); $this->_model->setName($fieldName); + $this->_model->setId($fieldId); $elementHtml = $this->_model->getElementHtml(); - $this->assertContains('assertContains(' Date: Tue, 10 Oct 2017 16:24:35 +0200 Subject: [PATCH 3/4] Refactoring code --- .../Magento/Framework/Data/Form/Element/Multiselect.php | 2 +- .../Framework/Data/Test/Unit/Form/Element/MultiselectTest.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php index b5d5352d642b9..4a493d79128f9 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php @@ -60,7 +60,7 @@ public function getElementHtml() $html .= ''; } if (!empty($this->_data['disabled'])) { - $html .= ''; + $html .= ''; } $html .= 'assertContains(' Date: Tue, 10 Oct 2017 16:39:22 +0200 Subject: [PATCH 4/4] Code style From unit test --- .../Framework/Data/Test/Unit/Form/Element/MultiselectTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php index 50519f567ad03..0750df0c3df03 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php @@ -32,7 +32,9 @@ public function testHiddenFieldPresentInMultiSelect() $this->_model->setName($fieldName); $this->_model->setId($fieldId); $elementHtml = $this->_model->getElementHtml(); - $this->assertContains('assertContains( + '