34 {
35 $constraint = $this->f->sequential(array($this->f->isInt(), $this->f->greaterThan(3), $this->f->lessThan(5)));
36 $raised = false;
37
38 try {
39 $constraint->check(4);
40 } catch (UnexpectedValueException $e) {
41 $raised = true;
42 }
43
44 $this->assertFalse($raised);
45
46 $constraint = $this->f->parallel(array($this->f->isInt(), $this->f->greaterThan(3), $this->f->lessThan(1)));
47 try {
48 $constraint->check(2);
49 $raised = false;
50 } catch (UnexpectedValueException $e) {
51 $this->assertEquals("'2' is not greater than '3'.'2' is greater than '1'.", $e->getMessage());
52 $raised = true;
53 }
54
55 $this->assertTrue($raised);
56 }