/** * test replace validation */ public function testReplaceValidation() { $input = new TextInput('foo', 'value'); $input->addValidation('required|min:5|max:25|not_in:14,15,16'); // should replace based on the raw rule name $input->replaceValidation('min:19|max:30'); $expected = array('required', 'not_in:14,15,16', 'min:19', 'max:30'); // note: replacements are placed at end $this->assertEquals($expected, $input->getValidations()); }