Esempio n. 1
0
 public function testShouldCheckRuleWhenInputIsNotOptional()
 {
     $input = 'foo';
     $validatable = $this->getMock('Respect\\Validation\\Validatable');
     $validatable->expects($this->once())->method('check')->with($input)->will($this->returnValue(true));
     $rule = new Optional($validatable);
     $this->assertTrue($rule->check($input));
 }