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
Mario
71ba6406e3
tests: Fix invalid keypair for channel fixture
...
(cherry picked from commit 9aff1d4024 )
Co-authored-by: Harald Eilertsen <haraldei@anduin.net >
2026-05-18 19:02:48 +00:00
Mario
3dd9559d9f
fix spdx info and remove superfluous use statements
2026-03-17 06:24:03 +00:00
Mario Vavti
51ac502d97
refactor drop_query_params() to deal with array params and add test
2026-03-16 10:32:59 +01:00
Harald Eilertsen
33c95c810a
tests: Make loadFixtures public
...
Some tests will need to load their own database fixtures. By making this
API public we make it easy for them to do so.
This change is needed by the tests for the Superblock addon.
Project......: Improve Superblock Addon
Sponsored-by.: NLnet NGI0 Commons Fund
2026-03-11 11:40:31 +01:00
Mario Vavti
86d58065b3
deal with leading or missing @ and add more tests
2026-03-04 10:25:32 +01:00
Mario
1f265cc6d5
fix tests (hopefully)
2026-03-04 08:44:09 +00:00
Mario
4474fdd4f9
introduce parse_webbie() with basic tests
2026-03-04 08:34:45 +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
5a6a7386a8
Merge branch 'more-xchan-tests' into 'dev'
...
tests: A few more xchan tests
See merge request hubzilla/core!2261
2026-01-29 10:38:35 +00:00
Harald Eilertsen
9fb5cd12be
tests: A few more xchan tests
2026-01-27 09:43:44 +01:00
Harald Eilertsen
d85c737db7
tests: Add ajax request helper to module test case
...
This is a bit crude, but serves the purpose for now. To emulate an AJAX
request we set the `Content-Type` header to `application/json`, and json
encode the params in the body of the request.
2026-01-26 23:03:07 +01:00
Mario
38f040f9b5
Merge branch 'minor-test-improvements' into 'dev'
...
tests: Make addonname/tests base addon tests dir
See merge request hubzilla/core!2250
2026-01-15 10:53:57 +00:00
Harald Eilertsen
cedc6c4230
Escape args in xchan_fetch
2026-01-04 14:55:03 +01:00
Harald Eilertsen
e289078f82
tests: Fix content-type/length in Module\TestCase
2025-12-21 11:04:25 +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
e5d0ef79ef
GD imagedestroy() is deprected and noop since PHP version 8.0
2025-12-16 11:16:28 +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
Mario
57c22f4d0f
fix test
2025-11-21 10:45:45 +00:00
Mario
f25ac63f18
Merge branch 'fix-warnings-in-owatest' into 'dev'
...
Set content type/length for module test requests
See merge request hubzilla/core!2244
2025-11-20 21:20:27 +00:00
Harald Eilertsen
ddf7fad82f
Set content type/length for module test requests
...
Just use default values of 'text/html' and 0 for now. Should probably be
set to more realistic values at some point, but for now it seems to
work.
This fixes warnings in the OwaTest.
2025-11-20 21:48:53 +01:00
Harald Eilertsen
6f8b7f177d
Replace use of create_identity in MagicTest
...
Use db fixtures instead. Make the test much snappier.
2025-11-19 22:01:42 +01:00
Harald Eilertsen
7a2a621309
Add hubloc test db fixture
...
Added entries in the hubloc table to correspond to the channel entries
in channel.yml. These would normally be created by `create_identity`, so
some code expects them to be there.
2025-11-19 21:59:45 +01:00
Harald Eilertsen
fe25bab3a7
Stub crypto calls from CreateIdentityTest
...
This speeds up the test runs significantly.
2025-11-19 16:58:08 +01:00
Harald Eilertsen
3abd764512
Drop create_identity from Zotfinger test
2025-11-16 22:14:33 +01:00
Harald Eilertsen
dc255a4ecf
Begin tests for Profiles module
2025-11-15 11:26:23 +01:00
Harald Eilertsen
39f4a56348
Begin tests for Zotfinger module
2025-11-15 11:26:11 +01:00
Harald Eilertsen
8e35ef2faa
Add test db fixtures for channel table
...
Add the system user and a test user to the table for use by tests.
2025-11-13 19:51:39 +01:00
Harald Eilertsen
b74a2dff9e
Reload test fixtures from db
...
Reload inserted rows from the DB when loading the test fixtures. This
ensures that we get all default fields and id columns initialized and
validated. Some code under test will require this to work as expected.
2025-11-13 19:51:39 +01:00
Harald Eilertsen
6400bcc81f
Set logged in shannel for delete account test
...
If the logged in account is not set, it triggers a warning.
2025-11-13 19:51:39 +01:00
Harald Eilertsen
1e92aeb7f9
Improve dba_pdo::insert function
2025-11-13 16:14:05 +00:00
Harald Eilertsen
f3d8838256
Fix deprecation notice in MessageWidgetTest
...
Creating dynamic properties in an object is deprecated in PHP 8.2.
Reference: https://www.php.net/manual/en/migration82.deprecated.php
2025-10-29 10:33:06 +01:00
Mario Vavti
a570ef4691
add test for ASCache::isCacheable()
2025-10-26 19:19:36 +01:00
Harald Eilertsen
7a7ff97e63
Unbreak test failure in Helpindex test
...
We need to mock the call to `is_readable`, since the file requested in
the test does not actually exist in the file system.
2025-10-20 10:54:12 +02:00
Mario Vavti
63e41c233f
the correct mime type for .jpg images is image/jpeg
2025-10-15 07:55:08 +02:00
Harald Eilertsen
3c89c7d4f4
Add ImageQuality class to hold quality values
2025-10-13 18:43:13 +02: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
9f99e401bc
Merge branch 'fix-markdown-mentions' into 'dev'
...
Prevent mentions from mangling by markdown parser
See merge request hubzilla/core!2211
2025-07-10 11:43:10 +00: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
cb491c53f7
Prevent mentions from mangling by markdown parser
...
Mentioning people whose handles include valid markdown would not survive
markdown to bbcode conversion wihout being mangled. An example that
brought this to my attention was a handle similar to this:
_someuser_@testsite.example
The underscores would be interpreted as emphasis in markdown, and
converted to:
[i]someuser[/i]@testsite.example
This patch should fix this, and hopefully any other issue with mentions
being mangled.
2025-06-28 13:35:05 +02:00
Mario
0e31d61868
Merge branch 'some-account-cleanup' into 'dev'
...
A bit of cleanup for account functions
See merge request hubzilla/core!2210
2025-06-24 07:53:43 +00:00
Harald Eilertsen
66e02c5e3a
A bit of cleanup for account functions
2025-06-24 07:53:42 +00:00