Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
#5986 Updated ZendTest\InputFilter\FactoryTest, added failing test te…
Browse files Browse the repository at this point in the history
…stCanCreateInputFilterWithNullInputs()
  • Loading branch information
bacinsky authored and weierophinney committed Apr 14, 2014
1 parent 090c5c0 commit 26da363
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/ZendTest/InputFilter/FactoryTest.php
Expand Up @@ -583,4 +583,25 @@ public function testSetsBreakChainOnFailure()

$this->assertFalse($factory->createInput(array('break_on_failure' => false))->breakOnFailure());
}

public function testCanCreateInputFilterWithNullInputs()
{
$factory = new Factory();

$inputFilter = $factory->createInputFilter(array(
'foo' => array(
'name' => 'foo',
),
'bar' => null,
'baz' => array(
'name' => 'baz',
),
));

$this->assertInstanceOf('Zend\InputFilter\InputFilter', $inputFilter);
$this->assertEquals(2, count($inputFilter));
$this->assertTrue($inputFilter->has('foo'));
$this->assertFalse($inputFilter->has('bar'));
$this->assertTrue($inputFilter->has('baz'));
}
}

0 comments on commit 26da363

Please sign in to comment.