toString() public method

public toString ( )
Example #1
0
 public function testToString()
 {
     $expr1 = new AndX();
     $expr2 = new AndX(array(new GreaterThan(10), new EndsWith('.css')));
     $expr3 = new AndX(array(new GreaterThan(10), new OrX(array(new Contains('foo'), new EndsWith('.css')))));
     $this->assertSame('', $expr1->toString());
     $this->assertSame('>10 && endsWith(".css")', $expr2->toString());
     $this->assertSame('>10 && (contains("foo") || endsWith(".css"))', $expr3->toString());
 }