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

Commit

Permalink
zendframework/zendframework#5986 Updated ZendTest\InputFilter\Factory…
Browse files Browse the repository at this point in the history
…Test, added failing test testCanCreateInputFilterWithNullInputs()
  • Loading branch information
bacinsky authored and weierophinney committed Apr 14, 2014
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/FactoryTest.php
Original file line number Diff line number Diff line change
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 38eff5a

Please sign in to comment.