예제 #1
0
 public function testNotEmptyValidatorNotInjectedIfContinueIfEmptyIsTrue()
 {
     $input = new Input('foo');
     $input->setContinueIfEmpty(true);
     $input->setValue('');
     $input->isValid();
     $validators = $input->getValidatorChain()->getValidators();
     $this->assertTrue(0 == count($validators));
 }
예제 #2
0
 public function testMergeRetainsContinueIfEmptyFlag()
 {
     $input = new Input('foo');
     $input->setContinueIfEmpty(true);
     $input2 = new Input('bar');
     $input2->merge($input);
     $this->assertTrue($input2->continueIfEmpty());
 }