/** * @expectedException Respect\Validation\Exceptions\EachException */ public function testAssertShouldFailWithNonIterableInput() { $v = new Each($this->getRuleMock(false)); $v->assert('a'); }
/** * @expectedException Respect\Validation\Exceptions\EachException */ public function testAssertShouldFailOnNonTraversable() { $v = new Each(new NotEmpty()); $result = $v->assert(123); $this->assertFalse($result); }
/** * @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); }