From 4f95a079361ec2f85a9107579d402bf6286ebcdd Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 19 Mar 2013 12:54:25 +0100 Subject: [PATCH] Removed deprecated NegationFilter tests, rewrote ExactMatchMultiFilter tests --- model/fieldtypes/ForeignKey.php | 2 +- model/fieldtypes/PrimaryKey.php | 2 +- tests/search/SearchContextTest.php | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/model/fieldtypes/ForeignKey.php b/model/fieldtypes/ForeignKey.php index 5d07d0d9e..fa4a2145f 100644 --- a/model/fieldtypes/ForeignKey.php +++ b/model/fieldtypes/ForeignKey.php @@ -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; diff --git a/model/fieldtypes/PrimaryKey.php b/model/fieldtypes/PrimaryKey.php index 0b9864c6b..c7bae8c53 100644 --- a/model/fieldtypes/PrimaryKey.php +++ b/model/fieldtypes/PrimaryKey.php @@ -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 diff --git a/tests/search/SearchContextTest.php b/tests/search/SearchContextTest.php index f5a9b7ca2..9e9578563 100644 --- a/tests/search/SearchContextTest.php +++ b/tests/search/SearchContextTest.php @@ -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",