@@ -66,7 +66,7 @@ protected function setUp()
66
66
->disableOriginalConstructor ()
67
67
->getMockForAbstractClass ();
68
68
$ this ->select = $ this ->getMockBuilder (Select::class)
69
- ->setMethods (['from ' , 'joinInner ' , 'joinLeft ' , 'where ' , 'columns ' ])
69
+ ->setMethods (['from ' , 'joinInner ' , 'joinLeft ' , 'where ' , 'columns ' , ' order ' ])
70
70
->disableOriginalConstructor ()
71
71
->getMock ();
72
72
$ this ->connectionMock ->expects ($ this ->atLeastOnce ())
@@ -112,10 +112,28 @@ public function testGetSelect()
112
112
{
113
113
$ this ->select ->expects ($ this ->exactly (1 ))->method ('from ' )->willReturnSelf ();
114
114
$ this ->select ->expects ($ this ->exactly (1 ))->method ('columns ' )->willReturnSelf ();
115
- $ this ->select ->expects ($ this ->exactly (5 ))->method ('joinInner ' )->willReturnSelf ();
115
+ $ this ->select ->expects ($ this ->exactly (6 ))->method ('joinInner ' )->willReturnSelf ();
116
116
$ this ->select ->expects ($ this ->exactly (3 ))->method ('joinLeft ' )->willReturnSelf ();
117
+ $ this ->select ->expects ($ this ->exactly (1 ))->method ('order ' )->willReturnSelf ();
117
118
$ this ->select ->expects ($ this ->exactly (2 ))->method ('where ' )->willReturnSelf ();
118
119
120
+ $ this ->attributeResourceMock ->expects ($ this ->exactly (9 ))
121
+ ->method ('getTable ' )
122
+ ->will (
123
+ $ this ->returnValueMap (
124
+ [
125
+ ['catalog_product_super_attribute ' , 'catalog_product_super_attribute value ' ],
126
+ ['catalog_product_entity ' , 'catalog_product_entity value ' ],
127
+ ['catalog_product_super_link ' , 'catalog_product_super_link value ' ],
128
+ ['eav_attribute ' , 'eav_attribute value ' ],
129
+ ['catalog_product_entity ' , 'catalog_product_entity value ' ],
130
+ ['catalog_product_super_attribute_label ' , 'catalog_product_super_attribute_label value ' ],
131
+ ['eav_attribute_option ' , 'eav_attribute_option value ' ],
132
+ ['eav_attribute_option_value ' , 'eav_attribute_option_value value ' ]
133
+ ]
134
+ )
135
+ );
136
+
119
137
$ this ->abstractAttributeMock ->expects ($ this ->atLeastOnce ())
120
138
->method ('getAttributeId ' )
121
139
->willReturn ('getAttributeId value ' );
@@ -138,10 +156,27 @@ public function testGetSelectWithBackendModel()
138
156
{
139
157
$ this ->select ->expects ($ this ->exactly (1 ))->method ('from ' )->willReturnSelf ();
140
158
$ this ->select ->expects ($ this ->exactly (0 ))->method ('columns ' )->willReturnSelf ();
141
- $ this ->select ->expects ($ this ->exactly (5 ))->method ('joinInner ' )->willReturnSelf ();
159
+ $ this ->select ->expects ($ this ->exactly (6 ))->method ('joinInner ' )->willReturnSelf ();
142
160
$ this ->select ->expects ($ this ->exactly (1 ))->method ('joinLeft ' )->willReturnSelf ();
161
+ $ this ->select ->expects ($ this ->exactly (1 ))->method ('order ' )->willReturnSelf ();
143
162
$ this ->select ->expects ($ this ->exactly (2 ))->method ('where ' )->willReturnSelf ();
144
163
164
+ $ this ->attributeResourceMock ->expects ($ this ->exactly (7 ))
165
+ ->method ('getTable ' )
166
+ ->will (
167
+ $ this ->returnValueMap (
168
+ [
169
+ ['catalog_product_super_attribute ' , 'catalog_product_super_attribute value ' ],
170
+ ['catalog_product_entity ' , 'catalog_product_entity value ' ],
171
+ ['catalog_product_super_link ' , 'catalog_product_super_link value ' ],
172
+ ['eav_attribute ' , 'eav_attribute value ' ],
173
+ ['catalog_product_entity ' , 'catalog_product_entity value ' ],
174
+ ['catalog_product_super_attribute_label ' , 'catalog_product_super_attribute_label value ' ],
175
+ ['eav_attribute_option ' , 'eav_attribute_option value ' ]
176
+ ]
177
+ )
178
+ );
179
+
145
180
$ this ->abstractAttributeMock ->expects ($ this ->atLeastOnce ())
146
181
->method ('getAttributeId ' )
147
182
->willReturn ('getAttributeId value ' );
0 commit comments