@@ -66,7 +66,7 @@ protected function setUp()
6666 ->disableOriginalConstructor ()
6767 ->getMockForAbstractClass ();
6868 $ this ->select = $ this ->getMockBuilder (Select::class)
69- ->setMethods (['from ' , 'joinInner ' , 'joinLeft ' , 'where ' , 'columns ' ])
69+ ->setMethods (['from ' , 'joinInner ' , 'joinLeft ' , 'where ' , 'columns ' , ' order ' ])
7070 ->disableOriginalConstructor ()
7171 ->getMock ();
7272 $ this ->connectionMock ->expects ($ this ->atLeastOnce ())
@@ -112,10 +112,28 @@ public function testGetSelect()
112112 {
113113 $ this ->select ->expects ($ this ->exactly (1 ))->method ('from ' )->willReturnSelf ();
114114 $ 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 ();
116116 $ this ->select ->expects ($ this ->exactly (3 ))->method ('joinLeft ' )->willReturnSelf ();
117+ $ this ->select ->expects ($ this ->exactly (1 ))->method ('order ' )->willReturnSelf ();
117118 $ this ->select ->expects ($ this ->exactly (2 ))->method ('where ' )->willReturnSelf ();
118119
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+
119137 $ this ->abstractAttributeMock ->expects ($ this ->atLeastOnce ())
120138 ->method ('getAttributeId ' )
121139 ->willReturn ('getAttributeId value ' );
@@ -138,10 +156,27 @@ public function testGetSelectWithBackendModel()
138156 {
139157 $ this ->select ->expects ($ this ->exactly (1 ))->method ('from ' )->willReturnSelf ();
140158 $ 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 ();
142160 $ this ->select ->expects ($ this ->exactly (1 ))->method ('joinLeft ' )->willReturnSelf ();
161+ $ this ->select ->expects ($ this ->exactly (1 ))->method ('order ' )->willReturnSelf ();
143162 $ this ->select ->expects ($ this ->exactly (2 ))->method ('where ' )->willReturnSelf ();
144163
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+
145180 $ this ->abstractAttributeMock ->expects ($ this ->atLeastOnce ())
146181 ->method ('getAttributeId ' )
147182 ->willReturn ('getAttributeId value ' );
0 commit comments