aboutsummaryrefslogtreecommitdiff
path: root/tests/app/Models/SearchTest.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-12-24 01:19:06 +0100
committerGravatar GitHub <noreply@github.com> 2025-12-24 01:19:06 +0100
commit00c61cf34c3f9a59b4dc16a4accd7cf85945a5a6 (patch)
tree78cb9940bc1ea860cc261a503f0baf686def7660 /tests/app/Models/SearchTest.php
parent3cd716861259c6d6a984041618c06c146aba4a2d (diff)
Fix serialisation of dates in searches (#8341)
Dates should not be expanded/resolved in string serialisations of search expressions, as it otherwise break relative user queries such as `P30D`. Fix of https://github.com/FreshRSS/FreshRSS/pull/8293
Diffstat (limited to 'tests/app/Models/SearchTest.php')
-rw-r--r--tests/app/Models/SearchTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php
index 213fdde45..9e107a79d 100644
--- a/tests/app/Models/SearchTest.php
+++ b/tests/app/Models/SearchTest.php
@@ -956,8 +956,8 @@ final class SearchTest extends \PHPUnit\Framework\TestCase {
/search_regex/i "quoted search" search
-e:3,4 -f:12,13 -c:22,23 -L:32,33 -labels:"Not label,Not other label"
-userdate:2025-06-01T00:00:00/2025-09-01T00:00:00
- -pubdate:2025-06-01T00:00:00/2025-09-01T00:00:00
- -date:2025-06-01T00:00:00/2025-09-01T00:00:00
+ -pubdate:2025
+ -date:P30D
-intitle:/Spam/i -intitle:"'bad"
-intext:/Spam/i -intext:"'bad"
-author:/Dave/i -author:Charlie
@@ -1070,8 +1070,8 @@ final class SearchTest extends \PHPUnit\Framework\TestCase {
['(a b) OR (c d)', 'e', 'e ((a b) OR (c d))'],
['(a b) (c d)', 'e', 'e ((a b) (c d))'],
['(a b)', 'e', 'e (a b)'],
- ['date:2024/', 'date:/2025', 'date:/2025-12-31T23:59:59'],
- ['a', 'date:/2025', 'date:/2025-12-31T23:59:59 a'],
+ ['date:2024/', 'date:/2025', 'date:/2025'],
+ ['a', 'date:/2025', 'date:/2025 a'],
];
}