/** * @magentoAppIsolation enabled */ public function testSortColumnsByOrder() { $columnNames = $this->_block->getLayout()->getChildNames($this->_block->getColumnSet()->getNameInLayout()); $this->assertEquals($this->_block->getColumn('column1')->getNameInLayout(), $columnNames[0]); $this->_block->addColumnsOrder('column1', 'column2'); $this->_block->sortColumnsByOrder(); $columnNames = $this->_block->getLayout()->getChildNames($this->_block->getColumnSet()->getNameInLayout()); $this->assertEquals($this->_block->getColumn('column2')->getNameInLayout(), $columnNames[0]); }