Beispiel #1
0
 public function testGetFilter()
 {
     $column = new Column($this->table, 'test');
     $filter = $column->getFilter();
     $this->assertTag(['tag' => 'div', 'attributes' => ['class' => 'grid-view-filter-container'], 'child' => ['tag' => 'input', 'attributes' => ['name' => 'test', 'type' => 'text', 'class' => 'grid-view-filter input-small form-control']]], $filter);
     $column = new Column($this->table, ['name' => 'test', 'filter' => [0 => 'no', 1 => 'yes']]);
     $filter = $column->getFilter();
     $this->assertTag(['tag' => 'select', 'attributes' => ['name' => 'test', 'class' => 'form-control'], 'descendant' => ['tag' => 'option', 'attributes' => ['value' => '0']]], $filter);
 }