Exemple #1
0
 public function testRemoveSubcolumns()
 {
     $col = new Column('foo');
     $col->addSubColumn($scol1 = new Column('bar'));
     $col->addSubColumn($scol2 = new Column('baz'));
     $col->removeSubColumn($scol1);
     $this->assertEquals(array($scol2), $col->getSubColumns());
 }
 public function testAddSubColumn()
 {
     $this->builder->addColumn('foo');
     $this->builder->addSubColumn('foo', 'foo.bar');
     $filter = $this->builder->getFilter();
     $col = new Column('foo');
     $col->addSubColumn(new Column('foo.bar'));
     $this->assertEquals(array($col), $filter->getColumns());
     $this->assertEquals($col, $filter->getColumn('foo'));
 }