From 4bd503591469f47e710f1afbf0b5883f7770065d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 17 Dec 2025 10:07:52 +0100 Subject: Rework encoding of search filters (#8324) Rework: * https://github.com/FreshRSS/FreshRSS/pull/8222 now that we have: * https://github.com/FreshRSS/FreshRSS/pull/8293 Follow-up of: * https://github.com/FreshRSS/FreshRSS/pull/8311 * More simplification * Deprecate getRawInput --- tests/app/Models/SearchTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/app') diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php index a543777ef..990598dff 100644 --- a/tests/app/Models/SearchTest.php +++ b/tests/app/Models/SearchTest.php @@ -10,7 +10,7 @@ final class SearchTest extends \PHPUnit\Framework\TestCase { #[DataProvider('provideEmptyInput')] public static function test__construct_whenInputIsEmpty_getsOnlyNullValues(string $input): void { $search = new FreshRSS_Search($input); - self::assertSame('', $search->getRawInput()); + self::assertSame('', $search->__toString()); self::assertNull($search->getIntitle()); self::assertNull($search->getMinDate()); self::assertNull($search->getMaxDate()); @@ -327,7 +327,6 @@ final class SearchTest extends \PHPUnit\Framework\TestCase { self::assertSame($max_pubdate_value, $search->getMaxPubdate()); self::assertSame($tags_value, $search->getTags()); self::assertSame($search_value, $search->getSearch()); - self::assertSame($input, $search->getRawInput()); } /** @return list> */ @@ -1033,7 +1032,9 @@ final class SearchTest extends \PHPUnit\Framework\TestCase { */ public static function provideBooleanSearchEnforce(): array { return [ + ['', '', ''], ['', 'intitle:b', 'intitle:b'], + ['intitle:a', '', 'intitle:a'], ['intitle:a', 'intitle:b', 'intitle:b'], ['a', 'intitle:b', 'intitle:b a'], ['intitle:a intext:a', 'intitle:b', 'intitle:b intext:a'], -- cgit v1.2.3