44 Commits

Author SHA1 Message Date
Mario
99fd2e1cb9 tests: Use minimal channel for LDSignature tests
Move the channel keypair and other fields needed by the
LDSignature::verify function to the test case itself. This makes the
test case independent on any potential future changes to the fixtures.


(cherry picked from commit 8d283e0be5)

Co-authored-by: Harald Eilertsen <haraldei@anduin.net>
2026-05-18 19:03:59 +00:00
Mario
a69c460ee6 tests: Add basic test for LDSignature::verify
(cherry picked from commit 0cd682d85e)

Co-authored-by: Harald Eilertsen <haraldei@anduin.net>
2026-05-18 19:03:11 +00:00
Harald Eilertsen
ccd6d1a38c Move db stats to separate classes for each db type
Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
2026-02-26 16:19:17 +01:00
Mario
87f79381d9 MessageFilter: move decoding to the caller and also check the summary field 2025-12-19 08:24:22 +00:00
Mario Vavti
2eb51233f6 fix hashtag and mentions count after fixing encoding and add tests 2025-12-12 19:15:28 +01:00
Mario Vavti
5432819788 add test for encoded filter entry 2025-12-12 18:51:53 +01:00
Mario Vavti
48dbba2f4d implement new version of MessageFilter derived from forte and add some more tests 2025-12-12 12:42:01 +01:00
Harald Eilertsen
4eb7e29bab Improve test isolation
To ensure tests don't step on each others toes, make sure we back up
the static properties of the global App class before running tests that
modify any of these properties.
2025-12-02 19:58:41 +01:00
Harald Eilertsen
3abd764512 Drop create_identity from Zotfinger test 2025-11-16 22:14:33 +01:00
Harald Eilertsen
39f4a56348 Begin tests for Zotfinger module 2025-11-15 11:26:11 +01:00
Mario Vavti
a570ef4691 add test for ASCache::isCacheable() 2025-10-26 19:19:36 +01:00
Harald Eilertsen
87c62db41e tests: Dataproviders should be static 2025-10-05 20:27:08 +02:00
Mario Vavti
ffce0a705b added test for Activity::pasteQuote() 2025-10-05 15:43:42 +02:00
Mario
08b7eb52c7 remove unneeded code from test 2025-07-09 08:00:27 +00:00
Mario Vavti
525594d529 update to phpseclib3 which is now a requirement for the http signer library 2025-07-08 11:35:56 +02:00
Mario Vavti
2054359f6c testing and fixes 2025-07-06 22:41:02 +02:00
Mario
9a3735cd37 tests for Activity::get_actor_protocols() 2025-07-06 18:32:08 +00:00
Harald Eilertsen
0c41265613 Throw if channel keys missing in JcsEddsa2022::sign 2025-06-05 15:45:46 +00:00
Mario Vavti
cace4c6c65 strtotime() accounts with the timezone - set it to UTC for the stored timestamp 2025-04-18 22:38:45 +02:00
Mario Vavti
d7aff9a4dd fix wrong logic 2025-04-18 21:19:38 +02:00
Mario Vavti
a4a7794315 implement until= in message filter 2025-04-18 21:00:33 +02:00
Mario Vavti
e69763f86d add more message filter tests 2025-04-18 10:21:16 +02:00
Mario Vavti
5db5a5cfe9 fixes and more test samples 2025-04-17 14:29:27 +02:00
Mario Vavti
6d62acb446 extend MessageFilter::test_condition() to deal with && and || conditions and add tests 2025-04-17 11:35:06 +02:00
Mario Vavti
126c7f9d62 improved tests 2025-04-14 17:35:35 +02:00
Mario Vavti
0d51ff1906 add test for Activity::getUUID() and Avtivity::getMessageID() methods 2025-04-14 13:23:49 +02:00
Harald Eilertsen
3a2f787f96 Add Zotlabs\Lib\Mailer class to replace z_mail function. 2024-11-22 09:59:14 +00:00
Harald Eilertsen
4e6f871bc4 tests: Add a basic test for ActivityStreams
This is just a basic test that parses a specific object, and tests that
all the referenced objects are fetched from the originating servers.
2024-10-02 09:51:22 +02:00
Harald Eilertsen
20a8da0683 tests: Remove obsolete stubs from Permissions tests
These stubs are no longer needed, as the tests have a db now.
2024-06-14 12:10:35 +02:00
Harald Eilertsen
cad82d12d2 Upgrade test framework to PHPUnit 10.5 2024-05-27 06:17:05 +00:00
Harald Eilertsen
630cecd740 Libzot: get_rpost_path was broken for URL's with no port. 2024-05-01 20:57:56 +02:00
Mario
0e59cfb839 fix code comment 2024-03-13 14:08:56 +01:00
Mario
328ce0a837 fix another regression from last Lib/Config refactor which returned the default falue in case the value was an array. also add a testcase for this situation 2024-03-13 14:05:58 +01:00
Mario
5207e1e774 remove unused include 2024-03-07 09:06:20 +00:00
Mario
c1228d6b6d whitespace 2024-03-07 10:01:46 +01:00
Mario
6262d351b7 fix deprecation warning and add test 2024-03-07 10:00:02 +01:00
Mario
a36de8ba1a Merge branch 'tests/fix-db-and-ci-integration' into 'dev'
tests: Integrate the DB in "unit" tests.

See merge request hubzilla/core!2081
2024-01-06 16:34:39 +00:00
Harald Eilertsen
e3d30763da tests: Integrate the DB in "unit" tests. 2024-01-06 16:34:38 +00:00
Mario
960bcb6b53 port test for JcsEddsa2022 from streams 2024-01-06 16:12:25 +00:00
Harald Eilertsen
9c184ddfd0 Fix deserialization of config values broken by 69266cd6.
This should fix issue #1828.

This patch makes it explicit that we store arrays in the config as json
encoded arrays, while we allow both json encoded and PHP serialized
arrays to be deserialized correctly. Unless it's a brand new install,
the existing data in the database will be PHP serialized.

I've also added a hardening measure in case we fall back to PHP
unserialize, making sure we're not vulnerable to a PHP Object Injection
attack. This means that deserializing arrays containing PHP objects will
no longer work, but afaict we never do that anyways, so I don't think
that should break anything.
2023-12-17 19:30:05 +01:00
Hilmar R
c26dede97f get dev 2021-03-01 18:48:11 +01:00
Klaus Weidenbach
8f0a0add1e :white_check_mark:💡 Add Unit Tests for AccessList class.
Also some Doxygen docu for this class.
2017-05-01 22:23:32 +02:00
Klaus Weidenbach
4a85726e55 👷 ⬆️ Update PHPUnit to current stable 6.
Update requirements to PHP7 for dev.
Add php-mock-phpunit to mock and stub global functions in a better way.
2017-03-14 20:41:29 +01:00
Klaus Weidenbach
b71e148cea [BUGFIX] for fromStandalonePermission().
Not sure if this method is used anywhere, but it should not have worked
correctly. This should correct it.
Add a unit test for this class.
2016-10-20 20:22:39 +02:00