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

Commit

Permalink
Merge branch 'hotfix/22'
Browse files Browse the repository at this point in the history
Close #22
  • Loading branch information
weierophinney committed Aug 26, 2015
2 parents 958585d + 0ee288b commit eccaff9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- [#22](https://github.com/zendframework/zend-inputfilter/pull/22) adds tests to
verify two conditions around inputs with fallback values:
- If the input was not in the data set, it should not be represented in either
the list of valid *or* invalid inputs.
- If the input *was* in the data set, but empty, it should be represented in
the list of valid inputs.
- [#31](https://github.com/zendframework/zend-inputfilter/pull/31) updates the
`InputFilterInterface::add()` docblock to match existing, shipped implementations.
- [#25](https://github.com/zendframework/zend-inputfilter/pull/25) updates the
Expand Down
4 changes: 4 additions & 0 deletions test/BaseInputFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,8 @@ public function testMissingRequiredThatAllowsEmptyWithFallbackShouldMarkInputVal
$data = $filter->getValues();
$this->assertArrayHasKey('bar', $data);
$this->assertEquals($bar->getFallbackValue(), $data['bar']);
$this->assertArrayNotHasKey('bar', $filter->getValidInput());
$this->assertArrayNotHasKey('bar', $filter->getInvalidInput());
}

/**
Expand Down Expand Up @@ -1109,6 +1111,8 @@ public function testEmptyRequiredValueWithFallbackShouldMarkInputValid()
$data = $filter->getValues();
$this->assertArrayHasKey('bar', $data);
$this->assertEquals($bar->getFallbackValue(), $data['bar']);
$this->assertArrayHasKey('bar', $filter->getValidInput());
$this->assertArrayNotHasKey('bar', $filter->getInvalidInput());
}

/**
Expand Down

0 comments on commit eccaff9

Please sign in to comment.