File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
lib/internal/Magento/Framework/Data/Test/Unit/Collection Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,14 @@ public function testSetAddOrder()
92
92
$ this ->collection ->addOrder ('some_field ' , Collection::SORT_ORDER_ASC );
93
93
$ this ->collection ->setOrder ('other_field ' , Collection::SORT_ORDER_ASC );
94
94
$ this ->collection ->addOrder ('other_field ' , Collection::SORT_ORDER_DESC );
95
+ $ this ->collection ->addOrder ('group ' , Collection::SORT_ORDER_ASC );
95
96
96
97
$ this ->collection ->load ();
97
98
$ selectOrders = $ select ->getPart (Select::ORDER );
98
99
$ this ->assertEquals (['select_field ' , 'ASC ' ], array_shift ($ selectOrders ));
99
100
$ this ->assertEquals ('some_field ASC ' , (string )array_shift ($ selectOrders ));
100
101
$ this ->assertEquals ('other_field DESC ' , (string )array_shift ($ selectOrders ));
102
+ $ this ->assertEquals ('`group` ASC ' , (string )array_shift ($ selectOrders )); // Reserved words need to be quoted
101
103
$ this ->assertEmpty (array_shift ($ selectOrders ));
102
104
}
103
105
You can’t perform that action at this time.
0 commit comments