public function testSetAddFormOptionsPhpFunction() { $from_to_array = array('name' => 'Date', 'underscored_name' => 'Underscored name'); $column = new Column($from_to_array); $column->setAddFormOptions(array('years' => array('.range' => array('from' => 1900, 'to' => 1915, 'step' => 5)))); $options = $column->getFormOptions(); $this->assertEquals(array(1900, 1905, 1910, 1915), $options['years']); }
public function testSetAddFormFilterOptionsPhpFunction() { $column = new Column("test", false); $addOptions = array('years' => array('.range' => array('from' => 1900, 'to' => 1915, 'step' => 5))); $column->setAddFormOptions($addOptions); $options = $column->getFormOptions(); $testOptions = array(1900, 1905, 1910, 1915); $this->assertEquals($testOptions, $options['years']); $column->setAddFilterOptions($addOptions); $options = $column->getFilterOptions(); $this->assertEquals($testOptions, $options['years']); }