Esempio n. 1
0
 /**
  * Tests chain closing.
  */
 public function testClose()
 {
     $input = new Fluent();
     $input->check(42, 'anwer')->validate('notEmpty', 'error')->condition('isInt')->validate('lessThan', 'error', 100)->close()->validate('isInt');
     $this->assertTrue($input->isValid());
     // But it's not a ZIP code...
     $input->validate('isZipCode');
     $this->assertFalse($input->isValid());
 }