Removed deprecated NegationFilter tests, rewrote ExactMatchMultiFilter tests

This commit is contained in:
Ingo Schommer 2013-03-19 12:54:25 +01:00
parent a44e06992a
commit 4f95a07936
3 changed files with 4 additions and 7 deletions

View File

@ -19,7 +19,7 @@ class ForeignKey extends Int {
*/ */
protected $object; protected $object;
public static $default_search_filter_class = 'ExactMatchMultiFilter'; public static $default_search_filter_class = 'ExactMatchFilter';
public function __construct($name, $object = null) { public function __construct($name, $object = null) {
$this->object = $object; $this->object = $object;

View File

@ -13,7 +13,7 @@ class PrimaryKey extends Int {
*/ */
protected $object; protected $object;
public static $default_search_filter_class = 'ExactMatchMultiFilter'; public static $default_search_filter_class = 'ExactMatchFilter';
/** /**
* @param string $name * @param string $name

View File

@ -124,8 +124,7 @@ class SearchContextTest extends SapphireTest {
$params = array( $params = array(
"ExactMatch" => "Match me exactly", "ExactMatch" => "Match me exactly",
"PartialMatch" => "partially", "PartialMatch" => "partially",
"Negation" => "undisclosed", "CollectionMatch" => array("ExistingCollectionValue","NonExistingCollectionValue",4,"Inline'Quotes'"),
"CollectionMatch" => "ExistingCollectionValue,NonExistingCollectionValue,4,Inline'Quotes'",
"StartsWith" => "12345", "StartsWith" => "12345",
"EndsWith" => "ijkl", "EndsWith" => "ijkl",
"Fulltext" => "two" "Fulltext" => "two"
@ -266,7 +265,6 @@ class SearchContextTest_AllFilterTypes extends DataObject implements TestOnly {
static $db = array( static $db = array(
"ExactMatch" => "Varchar", "ExactMatch" => "Varchar",
"PartialMatch" => "Varchar", "PartialMatch" => "Varchar",
"Negation" => "Varchar",
"SubstringMatch" => "Varchar", "SubstringMatch" => "Varchar",
"CollectionMatch" => "Varchar", "CollectionMatch" => "Varchar",
"StartsWith" => "Varchar", "StartsWith" => "Varchar",
@ -278,8 +276,7 @@ class SearchContextTest_AllFilterTypes extends DataObject implements TestOnly {
static $searchable_fields = array( static $searchable_fields = array(
"ExactMatch" => "ExactMatchFilter", "ExactMatch" => "ExactMatchFilter",
"PartialMatch" => "PartialMatchFilter", "PartialMatch" => "PartialMatchFilter",
"Negation" => "NegationFilter", "CollectionMatch" => "ExactMatchFilter",
"CollectionMatch" => "ExactMatchMultiFilter",
"StartsWith" => "StartsWithFilter", "StartsWith" => "StartsWithFilter",
"EndsWith" => "EndsWithFilter", "EndsWith" => "EndsWithFilter",
"FulltextField" => "FulltextFilter", "FulltextField" => "FulltextFilter",