Пример #1
0
 /**
  * @expectedException Respect\Validation\Exceptions\EachException
  */
 public function testAssertShouldFailWithNonIterableInput()
 {
     $v = new Each($this->getRuleMock(false));
     $v->assert('a');
 }
Пример #2
0
 /**
  * @expectedException Respect\Validation\Exceptions\EachException
  */
 public function testAssertShouldFailOnNonTraversable()
 {
     $v = new Each(new NotEmpty());
     $result = $v->assert(123);
     $this->assertFalse($result);
 }
Пример #3
0
 /**
  * @expectedException Respect\Validation\Exceptions\EachException
  */
 public function test_assert_should_fail_on_non_traversable()
 {
     $v = new Each(new NotEmpty());
     $result = $v->assert(123);
     $this->assertFalse($result);
 }