diff options
| author | 2025-12-17 10:07:52 +0100 | |
|---|---|---|
| committer | 2025-12-17 10:07:52 +0100 | |
| commit | 4bd503591469f47e710f1afbf0b5883f7770065d (patch) | |
| tree | 3f125f30b08b2d1a09063469543c974364deb331 /tests/app | |
| parent | 6952a13958417e8441645d0777597db679d0e28d (diff) | |
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
Diffstat (limited to 'tests/app')
| -rw-r--r-- | tests/app/Models/SearchTest.php | 5 |
1 files changed, 3 insertions, 2 deletions
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<list<mixed>> */ @@ -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'], |
