예제 #1
0
 function test_match()
 {
     $builder = new Dataface_QueryBuilder('Profiles');
     $query = $builder->_match('foo');
     $this->assertEquals("MATCH (`Profiles`.`title`,`Profiles`.`description`) AGAINST ('foo' IN BOOLEAN MODE)", $query);
     $query = $builder->_match('foo', true);
     $this->assertEquals("MATCH (`Profiles`.`title`,`Profiles`.`description`) AGAINST ('foo' IN BOOLEAN MODE)", $query);
     $query = $builder->_match('"foo bar"', true);
     $this->assertEquals("MATCH (`Profiles`.`title`,`Profiles`.`description`) AGAINST ('\"foo bar\"' IN BOOLEAN MODE)", $query);
 }