mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Removed deprecated NegationFilter tests, rewrote ExactMatchMultiFilter tests
This commit is contained in:
parent
a44e06992a
commit
4f95a07936
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user