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

Commit

Permalink
Create failing test for merging allowEmpty
Browse files Browse the repository at this point in the history
  • Loading branch information
DASPRiD committed May 27, 2014
1 parent b9205b1 commit 723d014
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/ZendTest/InputFilter/InputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,4 +311,19 @@ public function testMergeRetainsContinueIfEmptyFlag()
$input2->merge($input);
$this->assertTrue($input2->continueIfEmpty());
}

public function testMergeRetainsAllowEmptyFlag()
{
$input = new Input('foo');
$input->setRequired(true);
$input->setAllowEmpty(true);

$input2 = new Input('bar');
$input2->setRequired(true);
$input2->setAllowEmpty(false);
$input2->merge($input);

$this->assertTrue($input2->isRequired());
$this->assertTrue($input2->allowEmpty());
}
}

0 comments on commit 723d014

Please sign in to comment.