1
0
mirror of synced 2024-12-15 07:36:03 +03:00
This commit is contained in:
zYne 2007-07-30 19:34:05 +00:00
parent c045174fde
commit d877b8239e

View File

@ -57,14 +57,14 @@ class Doctrine_Search_Query_TestCase extends Doctrine_UnitTestCase
$e->save(); $e->save();
} }
/*'
public function testTokenizeClauseSupportsAndOperator() public function testTokenizeClauseSupportsAndOperator()
{ {
$q = new Doctrine_Search_Query('SearchTestIndex'); $q = new Doctrine_Search_Query('SearchTestIndex');
$ret = $q->tokenizeClause('doctrine AND orm'); $ret = $q->tokenizeClause('doctrine AND orm');
$this->assertEqual($ret, array('doctrine', 'orm')); $this->assertEqual($ret, array(array('doctrine', 'orm')));
} }
public function testTokenizeClauseSupportsOrOperator() public function testTokenizeClauseSupportsOrOperator()
@ -73,7 +73,7 @@ class Doctrine_Search_Query_TestCase extends Doctrine_UnitTestCase
$ret = $q->tokenizeClause('doctrine OR orm'); $ret = $q->tokenizeClause('doctrine OR orm');
$this->assertIdentical($ret, array(array('doctrine', 'orm'))); $this->assertIdentical($ret, array('doctrine', 'orm'));
} }
public function testTokenizeClauseSupportsMixingOfOperators() public function testTokenizeClauseSupportsMixingOfOperators()
@ -81,7 +81,7 @@ class Doctrine_Search_Query_TestCase extends Doctrine_UnitTestCase
$q = new Doctrine_Search_Query('SearchTestIndex'); $q = new Doctrine_Search_Query('SearchTestIndex');
$ret = $q->tokenizeClause('doctrine OR orm OR dbal AND database OR rdbms'); $ret = $q->tokenizeClause('doctrine OR orm OR dbal AND database OR rdbms');
$expected = array(array('doctrine', 'orm', 'dbal'), array('database', 'rdbms')); $expected = array('doctrine', 'orm', array('dbal', 'database'), 'rdbms');
$this->assertEqual($ret, $expected); $this->assertEqual($ret, $expected);
} }
@ -92,7 +92,7 @@ class Doctrine_Search_Query_TestCase extends Doctrine_UnitTestCase
$ret = $q->tokenizeClause('doctrine OR orm dbal AND database OR rdbms'); $ret = $q->tokenizeClause('doctrine OR orm dbal AND database OR rdbms');
$expected = array(array('doctrine', 'orm'), 'dbal', array('database', 'rdbms')); $expected = array('doctrine', array('orm', 'dbal', 'database'), 'rdbms');
$this->assertEqual($ret, $expected); $this->assertEqual($ret, $expected);
} }
@ -102,11 +102,11 @@ class Doctrine_Search_Query_TestCase extends Doctrine_UnitTestCase
$q = new Doctrine_Search_Query('SearchTestIndex'); $q = new Doctrine_Search_Query('SearchTestIndex');
$ret = $q->tokenizeClause('doctrine OR orm OR (dbal AND database OR rdbms)'); $ret = $q->tokenizeClause('doctrine OR orm OR (dbal AND database OR rdbms)');
$expected = array(array('doctrine', 'orm', '(dbal AND database OR rdbms)')); $expected = array('doctrine', 'orm', '(dbal and database or rdbms)');
$this->assertEqual($ret, $expected); $this->assertEqual($ret, $expected);
} }
/*
public function testParseClauseSupportsAndOperator() public function testParseClauseSupportsAndOperator()
{ {
$q = new Doctrine_Search_Query('SearchTestIndex'); $q = new Doctrine_Search_Query('SearchTestIndex');
@ -186,7 +186,7 @@ class Doctrine_Search_Query_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($ret, $sql); $this->assertEqual($ret, $sql);
} }
*/
public function testParseClauseSupportsNegationOperator() public function testParseClauseSupportsNegationOperator()
{ {
$q = new Doctrine_Search_Query('SearchTestIndex'); $q = new Doctrine_Search_Query('SearchTestIndex');
@ -258,7 +258,7 @@ class Doctrine_Search_Query_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($q->getSql(), $sql); $this->assertEqual($q->getSql(), $sql);
} }
*/
public function testSearchSupportsMixingOfOperators() public function testSearchSupportsMixingOfOperators()
{ {
$q = new Doctrine_Search_Query('SearchTestIndex'); $q = new Doctrine_Search_Query('SearchTestIndex');