Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUGFIX: stopped trying to decorate Page, which causes lots of issues …

…with derived classes
  • Loading branch information...
commit f3bcd3ec3855e12c33fc2e20e8c49dfbd4f1ca99 1 parent 4c502e1
@mrmorphic mrmorphic authored
Showing with 6 additions and 11 deletions.
  1. +6 −11 tests/SphinxSearchTest.php
View
17 tests/SphinxSearchTest.php
@@ -80,19 +80,14 @@ function testSearchTextSortCase3() {
function testFakeClientQuerying() {
$this->onceOnly();
- // Add sphinx extension to Page
- Object::add_extension('Page', 'SphinxSearchable');
-
- $res = SphinxSearch::search(array('Page'),
- "Page:(page1,page2)",
+ $res = SphinxSearch::search(array('SphinxTestBase'),
+ "SphinxTestBase:(longname1,longname2)",
array( 'require' => array(), 'suggestions' => false, 'page' => 0, 'pagesize' => 5, 'sortmode' => "fields", 'sortarg' => array("StringProp" => "asc")));
$this->assertEquals($res->Matches->Count(), 2, "Page:(id-list) fetch works");
- $res = SphinxSearch::search(array('Page'),
- "Page:\"Title\" like 'Test%'",
- array( 'require' => array(), 'suggestions' => false, 'page' => 0, 'pagesize' => 5, 'sortmode' => "fields", 'sortarg' => array("StringProp" => "asc")));
- $this->assertEquals($res->Matches->Count(), 3, "Page:cond fetch works");
-
- Object::remove_extension('Page', 'SphinxSearchable');
+ $res = SphinxSearch::search(array('SphinxTestBase'),
+ "SphinxTestBase:\"StringProp\" like 'Longname%'",
+ array( 'require' => array(), 'suggestions' => false, 'page' => 0, 'pagesize' => 10, 'sortmode' => "fields", 'sortarg' => array("StringProp" => "asc")));
+ $this->assertEquals($res->Matches->Count(), 9, "Page:cond fetch works");
}
/**
* Check that a dataset with SphinxTestBase are in correct StringProp order.
Please sign in to comment.
Something went wrong with that request. Please try again.