aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2025-04-18 21:00:33 +0200
committerMario Vavti <mario@mariovavti.com>2025-04-18 21:00:33 +0200
commita4a7794315538fc840cc002f9823fd8107d345bd (patch)
treecde891538685b5ba15cf798bdacde47b4639d664 /tests
parentc1d87fa65d6e2b65e0601b75772b98cf745c39dd (diff)
downloadvolse-hubzilla-a4a7794315538fc840cc002f9823fd8107d345bd.tar.gz
volse-hubzilla-a4a7794315538fc840cc002f9823fd8107d345bd.tar.bz2
volse-hubzilla-a4a7794315538fc840cc002f9823fd8107d345bd.zip
implement until= in message filter
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/Lib/MessageFilterTest.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/unit/Lib/MessageFilterTest.php b/tests/unit/Lib/MessageFilterTest.php
index 1b76a4690..ad7d2cc4d 100644
--- a/tests/unit/Lib/MessageFilterTest.php
+++ b/tests/unit/Lib/MessageFilterTest.php
@@ -30,7 +30,8 @@ class MessageFilterTest extends UnitTestCase {
'sensitive' => false
],
'item_private' => 0,
- 'item_thread_top' => 1
+ 'item_thread_top' => 1,
+ 'created' => '2025-04-18 20:50:00'
];
$this->assertEquals($result, MessageFilter::evaluate($item, $incl, $excl));
@@ -73,6 +74,26 @@ class MessageFilterTest extends UnitTestCase {
'lang=de',
true
],
+ 'until=2025-04-18 20:49:00 in excl' => [
+ '',
+ 'until=2025-04-18 20:49:00',
+ false
+ ],
+ 'until=2025-04-18 20:51:00 in excl' => [
+ '',
+ 'until=2025-04-18 20:51:00',
+ true
+ ],
+ 'until=2025-04-18 20:49:00 in incl' => [
+ 'until=2025-04-18 20:49:00',
+ '',
+ true
+ ],
+ 'until=2025-04-18 20:51:00 in incl' => [
+ 'until=2025-04-18 20:51:00',
+ '',
+ false
+ ],
'hashtag in incl' => [
'#grasshopper',
'',