aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2025-04-17 14:29:27 +0200
committerMario Vavti <mario@mariovavti.com>2025-04-17 14:29:27 +0200
commit5db5a5cfe91e598b949433b0de5ec87cd604c6a9 (patch)
treedb8a090045e4d12e640851d6870ef08a275465bd /tests
parent24f71dfcf894561c479899a82ca2a34a6040bc60 (diff)
downloadvolse-hubzilla-5db5a5cfe91e598b949433b0de5ec87cd604c6a9.tar.gz
volse-hubzilla-5db5a5cfe91e598b949433b0de5ec87cd604c6a9.tar.bz2
volse-hubzilla-5db5a5cfe91e598b949433b0de5ec87cd604c6a9.zip
fixes and more test samples
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/Lib/MessageFilterTest.php22
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/unit/Lib/MessageFilterTest.php b/tests/unit/Lib/MessageFilterTest.php
index dbdc9e517..2450b269f 100644
--- a/tests/unit/Lib/MessageFilterTest.php
+++ b/tests/unit/Lib/MessageFilterTest.php
@@ -25,7 +25,7 @@ class MessageFilterTest extends UnitTestCase {
'obj' => [
],
- 'item_private' => 1,
+ 'item_private' => 0,
'item_thread_top' => 1
];
@@ -107,23 +107,33 @@ class MessageFilterTest extends UnitTestCase {
'item.item_private < 1 in excl' => [
'',
"?item_private < 1",
- true
+ false
],
- 'item.item_thread_top == 1 and item.item_private < 1 in excl' => [
+ 'item.item_thread_top = 1 and item.item_private > 0 in excl' => [
'',
"?item_thread_top == 1 && ?item_private > 0 ",
true
],
- 'item.item_thread_top == 1 and item.item_private < 1 in excl' => [
+ 'item.item_thread_top = 1 and item.item_private < 1 in excl' => [
'',
"?item_thread_top == 1 && ?item_private < 1 ",
false
],
- 'item.item_thread_top == 1 or item.item_private < 1 in excl' => [
+ 'item.item_thread_top = 1 or item.item_private = 0 in excl' => [
+ '',
+ "?item_thread_top == 1 && ?item_private == 0",
+ false
+ ],
+ 'item.item_private < 1 and item.item_thread_top = 1 in excl' => [
'',
- "?item_thread_top == 1 || ?item_private = 0",
+ "?item_private < 1 && ?item_thread_top == 1",
false
],
+ 'item.item_private < 1 and item.item_thread_top = 0 in excl' => [
+ '',
+ "?item_private < 1 && ?item_thread_top == 0",
+ true
+ ],
];
}
}