Skip to content

Commit fb67134

Browse files
committed
Fix static tests.
1 parent 8361958 commit fb67134

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/**
8-
* Product attribute add/edit form main tab
9-
*
10-
* @author Magento Core Team <[email protected]>
11-
*/
127
namespace Magento\Eav\Block\Adminhtml\Attribute\Edit\Main;
138

149
use Magento\Catalog\Model\ResourceModel\Eav\Attribute;
1510

11+
/**
12+
* Product attribute add/edit form main tab
13+
*/
1614
abstract class AbstractMain extends \Magento\Backend\Block\Widget\Form\Generic
1715
{
1816
/**
@@ -279,10 +277,11 @@ protected function _initFormValues()
279277
}
280278

281279
/**
282-
* Processing block html after rendering
280+
* Processing block html after rendering.
281+
*
283282
* Adding js block to the end of this block
284283
*
285-
* @param string $html
284+
* @param string $html
286285
* @return string
287286
*/
288287
protected function _afterToHtml($html)

app/code/Magento/Eav/Setup/EavSetup.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
use Magento\Eav\Model\Entity\Setup\PropertyMapperInterface;
1111
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory;
1212
use Magento\Framework\App\CacheInterface;
13-
use Magento\Framework\App\ObjectManager;
14-
use Magento\Framework\App\ResourceConnection;
1513
use Magento\Framework\Exception\LocalizedException;
1614
use Magento\Framework\Setup\ModuleDataSetupInterface;
1715

1816
/**
17+
* Base eav setup class.
18+
*
1919
* @api
2020
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
2121
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -101,7 +101,8 @@ public function __construct(
101101
}
102102

103103
/**
104-
* Gets setup model
104+
* Gets setup model.
105+
*
105106
* @deprecated
106107
* @return ModuleDataSetupInterface
107108
*/
@@ -568,6 +569,8 @@ public function addAttributeGroup($entityTypeId, $setId, $name, $sortOrder = nul
568569
}
569570

570571
/**
572+
* Convert group name to attribute group code.
573+
*
571574
* @param string $groupName
572575
* @return string
573576
* @since 100.1.0

app/code/Magento/Eav/Test/Unit/Model/Entity/Attribute/Source/BooleanTest.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ public function addValueSortToCollectionDataProvider()
101101
'expectedJoinCondition' => [
102102
0 => [
103103
'requisites' => ['code_t1' => "table"],
104-
'condition' => "e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123' AND code_t1.store_id='0'",
104+
'condition' => "e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123'"
105+
. " AND code_t1.store_id='0'",
105106
],
106107
1 => [
107108
'requisites' => ['code_t2' => "table"],
108-
'condition' => "e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123' AND code_t2.store_id='12'",
109+
'condition' => "e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123'"
110+
. " AND code_t2.store_id='12'",
109111
],
110112
],
111113
'expectedOrder' => 'IF(code_t2.value_id > 0, code_t2.value, code_t1.value) ASC',
@@ -116,11 +118,13 @@ public function addValueSortToCollectionDataProvider()
116118
'expectedJoinCondition' => [
117119
0 => [
118120
'requisites' => ['code_t1' => "table"],
119-
'condition' => "e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123' AND code_t1.store_id='0'",
121+
'condition' => "e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123'"
122+
. " AND code_t1.store_id='0'",
120123
],
121124
1 => [
122125
'requisites' => ['code_t2' => "table"],
123-
'condition' => "e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123' AND code_t2.store_id='12'",
126+
'condition' => "e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123'"
127+
. " AND code_t2.store_id='12'",
124128
],
125129
],
126130
'expectedOrder' => 'IF(code_t2.value_id > 0, code_t2.value, code_t1.value) DESC',
@@ -131,7 +135,8 @@ public function addValueSortToCollectionDataProvider()
131135
'expectedJoinCondition' => [
132136
0 => [
133137
'requisites' => ['code_t' => "table"],
134-
'condition' => "e.entity_id=code_t.entity_id AND code_t.attribute_id='123' AND code_t.store_id='0'",
138+
'condition' => "e.entity_id=code_t.entity_id AND code_t.attribute_id='123'"
139+
. " AND code_t.store_id='0'",
135140
],
136141
],
137142
'expectedOrder' => 'code_t.value DESC',
@@ -142,7 +147,8 @@ public function addValueSortToCollectionDataProvider()
142147
'expectedJoinCondition' => [
143148
0 => [
144149
'requisites' => ['code_t' => "table"],
145-
'condition' => "e.entity_id=code_t.entity_id AND code_t.attribute_id='123' AND code_t.store_id='0'",
150+
'condition' => "e.entity_id=code_t.entity_id AND code_t.attribute_id='123'"
151+
. " AND code_t.store_id='0'",
146152
],
147153
],
148154
'expectedOrder' => 'code_t.value ASC',

0 commit comments

Comments
 (0)