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

Commit

Permalink
Merge pull request #72 branch 'hotfix/72'
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed Oct 8, 2015
2 parents a05fa0b + 3ffd32c commit a46714e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- Nothing.
- [#72](https://github.com/zendframework/zend-inputfilter/pull/72) `ArrayInput`
value is properly reset after `BaseInputFilter::setData()`

## 2.5.5 - 2015-09-03

Expand Down
5 changes: 0 additions & 5 deletions src/BaseInputFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,6 @@ protected function populate()
continue;
}

if ($input instanceof ArrayInput) {
$input->setValue([]);
continue;
}

if ($input instanceof Input) {
$input->resetValue();
continue;
Expand Down
18 changes: 0 additions & 18 deletions test/BaseInputFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use PHPUnit_Framework_MockObject_MockObject as MockObject;
use PHPUnit_Framework_TestCase as TestCase;
use stdClass;
use Zend\InputFilter\ArrayInput;
use Zend\InputFilter\BaseInputFilter;
use Zend\InputFilter\Exception\InvalidArgumentException;
use Zend\InputFilter\Exception\RuntimeException;
Expand Down Expand Up @@ -556,23 +555,6 @@ public function testAddingExistingInputWillMergeIntoExisting()
$this->assertFalse($filter->get('foo')->isRequired());
}

/**
* @group 5638
*/
public function testPopulateSupportsArrayInputEvenIfDataMissing()
{
/** @var ArrayInput|MockObject $arrayInput */
$arrayInput = $this->getMock(ArrayInput::class);
$arrayInput
->expects($this->once())
->method('setValue')
->with([]);

$filter = $this->inputFilter;
$filter->add($arrayInput, 'arrayInput');
$filter->setData(['foo' => 'bar']);
}

/**
* @group 6431
*/
Expand Down

0 comments on commit a46714e

Please sign in to comment.