Example #1
0
 function testPipePriorFilter()
 {
     $filter = new T_Validate_IsNumericRange('min', 'max', new T_Test_Filter_Failure());
     $test = new T_Form_Fieldset('container', 'label');
     $min = new T_Test_Form_ElementStub('min', 'label');
     $test->addChild($min);
     $max = new T_Test_Form_ElementStub('max', 'label');
     $test->addChild($max);
     $test->validate(new T_Cage_Array(array('min' => 0.9, 'max' => 1.2)));
     try {
         $filter->transform($test);
         $this->fail();
     } catch (T_Exception_Filter $e) {
     }
 }
Example #2
0
 function testPipePriorFilter()
 {
     $filter = new T_Validate_Confirm('master', 'slave', new T_Test_Filter_Failure());
     $test = new T_Form_Fieldset('container', 'label');
     $master = new T_Test_Form_ElementStub('master', 'label');
     $test->addChild($master);
     $slave = new T_Test_Form_ElementStub('slave', 'label');
     $test->addChild($slave);
     $test->validate(new T_Cage_Array(array('master' => 'a', 'slave' => 'a')));
     try {
         $filter->transform($test);
         $this->fail();
     } catch (T_Exception_Filter $e) {
     }
 }