evaluate() public method

public evaluate ( $value )
Example #1
0
 public function testEvaluate()
 {
     $expr = new Key('key', new GreaterThan(10));
     $this->assertTrue($expr->evaluate(array('key' => 11)));
     $this->assertFalse($expr->evaluate(array('key' => 9)));
     $this->assertFalse($expr->evaluate(array()));
     $this->assertFalse($expr->evaluate('foobar'));
 }