public function testSmallerThan() { $expression = Expression::smallerThan('apple', '1'); $this->assertEquals('apple', $expression->lval()); $this->assertEquals('1', $expression->rval()); $this->assertEquals('<', $expression->operator()); }
public function testQuerySimpleSelectUsingGroupAndHavingUseOr() { $instance = $this->_instance; $instance->query($instance->select(array('uid', 'id'), 'name')->from('table.users')->group('name')->having(Expression::smallerThan('uid', 2), Helper::CONJUNCTION_OR)); $result = $instance->fetchAssoc(); $this->assertEquals('1', $result['id']); }