Permalink
Browse files

[#4838] Added test

- Added test to ensure that change works
  • Loading branch information...
1 parent 1bf0337 commit 4c8623a490fea542e169ad85be6069a330b7198a @weierophinney weierophinney committed Jul 19, 2013
Showing with 14 additions and 1 deletion.
  1. +14 −1 tests/ZendTest/InputFilter/FactoryTest.php
@@ -520,11 +520,24 @@ public function testConflictNameWithInputFilterType()
public function testCustomFactoryInCollection()
{
$factory = new CustomFactory();
- /** @var \Zend\InputFilter\CollectionInputFilter $inputFilter */
$inputFilter = $factory->createInputFilter(array(
'type' => 'collection',
'input_filter' => new InputFilter(),
));
$this->assertInstanceOf('ZendTest\InputFilter\TestAsset\CustomFactory', $inputFilter->getFactory());
}
+
+ /**
+ * @group 4838
+ */
+ public function testCanSetInputErrorMessage()
+ {
+ $factory = new Factory();
+ $input = $factory->createInput(array(
+ 'name' => 'test',
+ 'type' => 'Zend\InputFilter\Input',
+ 'error_message' => 'Custom error message',
+ ));
+ $this->assertEquals('Custom error message', $input->getErrorMessage());
+ }
}

0 comments on commit 4c8623a

Please sign in to comment.