Commit Graph

248 Commits

Author SHA1 Message Date
Mario Vavti
ffce0a705b added test for Activity::pasteQuote() 2025-10-05 15:43:42 +02:00
Harald Eilertsen
c064cfde91 Look for unit tests for extensions as well as core 2025-09-02 08:38:50 +02:00
Harald Eilertsen
2826d030f4 Remove obsolete phpunit configurations
These are not in use, probably outdated, and just confusing.
2025-09-02 08:38:50 +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
Mario
7320149fd8 only show the pin if we display the label and fix the test 2025-06-19 08:26:31 +00:00
Mario Vavti
18016ab36a remove some redundant spaces in bbcode to html conversion and fix tests 2025-06-18 11:55:47 +02:00
Mario
d788233bd7 handle naked geo URIs and add tests 2025-06-18 09:18:11 +00:00
Harald Eilertsen
0c41265613 Throw if channel keys missing in JcsEddsa2022::sign 2025-06-05 15:45:46 +00:00
Mario Vavti
6a2748724c guess_image_type(): fix minor issue and add some tests (guessing from getimagesize() and Imagick is not tested) 2025-05-20 22:10:52 +02:00
Harald Eilertsen
1eb3357584 Add a couple of tests for Widget\Messages
Just a couple of basic tests around listing file tags, to make sure the
code runs without any warnings.
2025-05-19 10:24:13 +02:00
Harald Eilertsen
456a741809 Replace english docs with pepecyb's docs 2025-05-18 18:42:45 +00:00
Harald Eilertsen
7cb8a56b6a Don't access APP:$observer directly in core
Introduce helper functions to access the various fields of the xchan
stored in `App::$observer'. This removes direct access to the attribute
from core, with the aim of allowing further refactoring later.

We can not yet make the `App::$observer` attribute private, though, as
it is also accessed directly by some addons.
2025-05-09 15:15:35 +02:00
Mario Vavti
1e41c83b35 fix test 2025-04-20 21:43:32 +02: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
Mario
66f793cb83 more fix downstream test for an upstream bug 2025-04-09 16:07:00 +00:00
Mario
6d926f4271 fix downstream test for an upstream bug 2025-04-09 15:47:21 +00:00
Mario Vavti
9eff1a08d4 refactor unparse_url() to allow to return a custom field set only and add tests 2025-02-26 16:26:40 +01:00
Harald Eilertsen
0dd456c653 Replace the the code to extract epub thumbnails
The PHP Epub Meta library has a dependency that prevents deployment on
32bit architectures. We also don't need all the functionality in that
library, so this patch replaces it with our own simplified code for
fetching the cover embedded in Epub archives.

We also expand the test suite and clean up some minor issues in the
Epubthumbnail class.
2025-02-12 20:05:42 +01:00
Mario
0edf761499 Merge branch 'owa-error-messages' into 'dev'
Add error message on missing owa auth headers

See merge request hubzilla/core!2183
2025-02-01 10:53:12 +00:00
Harald Eilertsen
a550c7c853 Add error message on missing owa auth headers
If the /owa endpoint received a request with a missing or invalid
Authorization header, it would return an error to the requester, but
without any message describing why it failes.

This patch adds a message to the error response, so that it will be a
bit easier to debug these issues in the future.

The owa spec includes a 'message' field in the error response, but makes
it optional. Any conforming implementations should accept a response
that includes the 'message' field.
2025-01-29 18:41:40 +01:00
Harald Eilertsen
82a3b71a51 Fix broken DbaPdo test on postgresql 2025-01-29 13:24:12 +01:00
Harald Eilertsen
e39b2eb7b9 Add an dba_pdo::update method
This is a convenience funcition to make it easier to update an existing
row in a database table.
2025-01-29 12:42:44 +01:00
Harald Eilertsen
7eb6f9b11d Only skip DbaPdo returning test on actual MySQL
MySQL does not support the INSERT...RETURNING clause, while MariaDB
does. This patch ensures that the test is not skipped on MariaDB, but
only on an actual MySQL system.
2025-01-29 12:42:44 +01:00
Harald Eilertsen
3e6a646603 Add an insert method to dba_pdo
A common use case is to insert a record into a database table, but also
instantiate an object from the inserted data. This requires that we know
the value of any default or calculated columns that is filled in by the
database when the row is inserter.

This patch adds a `insert` method to pda_dbo that will insert a row, and
immediately fetch the row back from the database – including the default
and calculated values not specified by the insert itself.
2025-01-29 12:42:36 +01:00
Mario Vavti
e9222d0d9a add test for item_forwardable() 2024-12-10 22:45:56 +01:00
Mario Vavti
bb0a22ee58 add test for relative_time() 2024-12-07 23:49:17 +01:00
Harald Eilertsen
0189d04614 Fix and refactor module Admin\Accounts part I 2024-11-27 08:15:59 +00:00
Harald Eilertsen
5338793883 Ubreak tests: update MagicTest for new behaviour of Magic module. 2024-11-19 11:10:49 +01:00
Harald Eilertsen
5b7f8d986c Fix #1879: Emails with + in local part was rejected. 2024-11-16 13:45:36 +01:00
Mario
3791dfab3a Merge branch 'begin-refactoring-module-item' into 'dev'
Begin refactoring Module\Item

See merge request hubzilla/core!2166
2024-11-10 18:01:06 +00:00
Harald Eilertsen
57e69372d3 Module\Item: Move processing of zot and as requests to functions.
These seem to be entirely independent, so moving the body of the if
statements to separate functions should be fine.
2024-11-10 16:43:48 +01:00
Harald Eilertsen
fbc79e36e0 Remove import of non-existing class in test.
This one snuck in by mistake. No harm done, as the actual class was
never referenced, but it should still not be there.
2024-11-09 14:38:27 +01:00
Mario
0ed08274f1 Merge branch 'clean-up-some-dependencies' into 'dev'
Clean up deps and upgrade EpubMeta

See merge request hubzilla/core!2162
2024-11-09 10:24:26 +00:00
Harald Eilertsen
0534fe6886 Thumbs\Epubthumb: Adapt to new version of EPub meta lib.
Also fixes a few issues and refactor the code a bit.
2024-11-08 16:48:23 +01:00
Harald Eilertsen
47f109451d Fix some more deprecation warnings in the tests. 2024-11-07 17:29:54 +01:00
Mario
229efddbf1 Merge branch 'fix-mariadb-support-for-test-setup' into 'dev'
tests: Update test db setup script for mariadb

See merge request hubzilla/core!2160
2024-11-06 11:50:40 +00:00