Permalink
Browse files

Merge branch 'hotfix/5926' into develop

Close #5926
  • Loading branch information...
2 parents 4599c6c + fcdc32a commit aa809a3196f99e091e17c7da4a1f08588149bde3 @weierophinney weierophinney committed Mar 7, 2014
Showing with 6 additions and 1 deletion.
  1. +3 −0 library/Zend/InputFilter/Factory.php
  2. +3 −1 tests/ZendTest/InputFilter/FactoryTest.php
@@ -303,6 +303,9 @@ public function createInputFilter($inputFilterSpecification)
if (isset($inputFilterSpecification['count'])) {
$inputFilter->setCount($inputFilterSpecification['count']);
}
+ if (isset($inputFilterSpecification['required'])) {
+ $inputFilter->setIsRequired($inputFilterSpecification['required']);
+ }
return $inputFilter;
}
@@ -439,12 +439,14 @@ public function testFactoryAcceptsCollectionInputFilter()
$inputFilter = $factory->createInputFilter(array(
'type' => 'Zend\InputFilter\CollectionInputFilter',
+ 'required' => true,
'inputfilter' => new InputFilter(),
- 'count' => 3
+ 'count' => 3,
));
$this->assertInstanceOf('Zend\InputFilter\CollectionInputFilter', $inputFilter);
$this->assertInstanceOf('Zend\InputFilter\InputFilter', $inputFilter->getInputFilter());
+ $this->assertTrue($inputFilter->getIsRequired());
$this->assertEquals(3, $inputFilter->getCount());
}

0 comments on commit aa809a3

Please sign in to comment.