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

Commit

Permalink
Merge branch 'feature/i18n-filters-upd' of https://github.com/denixpo…
Browse files Browse the repository at this point in the history
…rt/zf2 into feature/i18n-filters
  • Loading branch information
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/InputTest.php
Expand Up @@ -135,19 +135,19 @@ public function testIsValidReturnsFalseIfValidationChainFails()
public function testIsValidReturnsTrueIfValidationChainSucceeds()
{
$input = new Input('foo');
$input->setValue('bar');
$validator = new Validator\Alpha();
$input->setValue('123');
$validator = new Validator\Digits();
$input->getValidatorChain()->addValidator($validator);
$this->assertTrue($input->isValid());
}

public function testValidationOperatesOnFilteredValue()
{
$input = new Input('foo');
$input->setValue(' bar ');
$input->setValue(' 123 ');
$filter = new Filter\StringTrim();
$input->getFilterChain()->attach($filter);
$validator = new Validator\Alpha();
$validator = new Validator\Digits();
$input->getValidatorChain()->addValidator($validator);
$this->assertTrue($input->isValid());
}
Expand Down

0 comments on commit a278174

Please sign in to comment.