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;
public static $default_search_filter_class = 'ExactMatchMultiFilter';
public static $default_search_filter_class = 'ExactMatchFilter';
public function __construct($name, $object = null) {
$this->object = $object;

View File

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

View File

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