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;
|
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;
|
||||||
|
@ -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
|
||||||
|
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user