public function testCanPassAllValuesToConstructor() { $predicate = new Operator('bar', '>=', 'foo.bar', Operator::TYPE_VALUE, Operator::TYPE_IDENTIFIER); $this->assertEquals(Operator::OP_GTE, $predicate->getOperator()); $this->assertEquals('bar', $predicate->getLeft()); $this->assertEquals('foo.bar', $predicate->getRight()); $this->assertEquals(Operator::TYPE_VALUE, $predicate->getLeftType()); $this->assertEquals(Operator::TYPE_IDENTIFIER, $predicate->getRightType()); }
public function testLeftIsMutable() { $operator = new Operator(); $operator->setLeft('foo.bar'); $this->assertEquals('foo.bar', $operator->getLeft()); }