Exemplo n.º 1
0
 public function testFilterValue()
 {
     // No filters
     $srcValue = 'test value';
     $this->assertEquals($srcValue, $this->object->filterValue($srcValue));
     $this->object->setFilters(array());
     $this->assertEquals($srcValue, $this->object->filterValue($srcValue));
     $x = new ucTestCellFilter();
     // one filter
     $this->object->setFilters(array('ucTestCellFilter' => array()));
     $this->assertEquals('TEST VALUE', $this->object->filterValue($srcValue));
     // two filters
     $this->object->setFilters(array('ucTestCellFilter' => array(), 'reverseTestCellFilter' => array()));
     $this->assertEquals('EULAV TSET', $this->object->filterValue($srcValue));
     // three filters, one using properties
     $this->object->setFilters(array('ucTestCellFilter' => array(), 'constTestCellFilter' => array('const' => 'XyZ'), 'reverseTestCellFilter' => array()));
     $this->assertEquals('ZyXEULAV TSET', $this->object->filterValue($srcValue));
 }