public function testCreateView() { $gridView = new GridView(); $gridView->setName('name'); $gridView->setFiltersData(['f' => 'fv']); $gridView->setSortersData(['s' => 'sv']); $expectedView = new View(null, ['f' => 'fv'], ['s' => 'sv'], GridView::TYPE_PRIVATE); $expectedView->setLabel('name'); $this->assertEquals($expectedView, $gridView->createView()); }
public function testCreateView() { $gridView = new GridView(); $gridView->setName('name'); $gridView->setFiltersData(['f' => 'fv']); $gridView->setSortersData(['s' => 'sv']); $gridView->setColumnsData(['name' => ['order' => 4]]); $expectedView = new View(null, ['f' => 'fv'], ['s' => 'sv'], GridView::TYPE_PRIVATE, ['name' => ['order' => 4]]); $expectedView->setLabel('name'); static::assertEquals($expectedView, $gridView->createView()); }