supahgreg
d692863760
Improve handling of 'src' and 'srcset' in Sanitizer.
2025-11-07 17:29:37 +00:00
supahgreg
a041e2a390
Fix Sanitizer and test issues.
2025-11-07 10:01:07 +00:00
supahgreg
287e293a3a
Disallow localhost/loopback and private URLs in certain sanitization situations.
2025-11-07 08:15:46 +00:00
supahgreg
d92c1a9d84
Fix 'UrlHelper' stripping port numbers.
...
'UrlHelper::build_url()' and 'UrlHelper::rewrite_relative()' now preserve port numbers.
2025-11-07 03:34:27 +00:00
supahgreg
e37e18e2a5
Add more tests (generated).
2025-10-20 04:38:32 +00:00
supahgreg
e1f34c982c
Stop using 'set_include_path', remove related PHPStan exclude.
2025-10-17 03:29:51 +00:00
supahgreg
cb2659b5d5
PHPUnit cleanup, get group detection working.
2025-10-11 16:27:34 +00:00
supahgreg
cd42738331
Update PHPUnit config+test for 12.x.
2025-10-11 15:39:15 +00:00
Andrew Dolgov
36644365c8
use built-in feed for integration test
2025-09-02 22:22:24 +03:00
Andrew Dolgov
0a6b41a3df
let's use gitlab rss feed in phpunit for now
2025-05-29 07:48:45 +03:00
Andrew Dolgov
0a3bec7201
switch selenium to services
2025-05-22 14:44:54 +03:00
Andrew Dolgov
9c66b9b326
adjust timeouts again
2025-05-22 12:42:41 +03:00
Andrew Dolgov
80647fa4e8
fix typo
2025-05-22 12:40:23 +03:00
Andrew Dolgov
cb6fe8f974
adjust timeouts
2025-05-22 12:36:20 +03:00
Andrew Dolgov
99caba74a9
also add driver implicit wait for element search
2025-05-22 11:48:40 +03:00
Andrew Dolgov
33047a86ba
try adding selenium page timeout
2025-05-22 11:45:08 +03:00
Andrew Dolgov
eb47047351
maybe fix integration tests failing by always initializing apitest fields
2024-12-16 09:34:14 +03:00
wn_
a1bd6cea1b
Use native typing in more places and clean up 'FeedEnclosure' a bit.
2024-12-14 12:26:59 +00:00
Andrew Dolgov
42ebdb027e
fix get_self_url() misbehaving in plugins/
2024-11-04 13:59:02 +03:00
Andrew Dolgov
0163884ef6
add another test for self url, split regex into two parts - one for plugins, one for everything else
2024-09-15 07:17:48 +03:00
Andrew Dolgov
78c903cb7f
fix Config::get_self_url() invoked from plugin context, better deal with multiple trailing slashes in URL, update phpunit image path
2024-09-14 10:53:40 +03:00
wn_
16b89cc293
Move 'include/functions.php' require into Composer autoloader.
...
Autoloader regenerated with 'composer dump-autoload --optimize'.
2024-04-20 16:25:33 +00:00
wn_
90e7bf7cc3
Update all UrlHelper::fetch() calls to use the associative array approach.
...
The other approach (passing in individual params) was marked as deprecated a few years ago.
2023-12-30 15:39:17 +00:00
wn_
91a91dac15
Perform validation of redirect URLs during the redirect process.
...
Previously, validation was only done after all redirects and the final request had completed. This approach ensures all redirects are to URLs that pass extended validation.
2023-12-29 00:41:52 +00:00
wn_
0ea9db3170
Fix specifying auth type in UrlHelper::fetch(), add a test for 403 auth retry.
2023-12-24 11:21:43 +00:00
wn_
9a1f7c2ebf
Appease PHPStan in UrlHelperTest
2023-12-23 19:58:39 +00:00
wn_
3c171cc92c
Add some tests for UrlHelper::fetch()
2023-12-23 19:52:56 +00:00
Chih-Hsuan Yen
f1a9ac9b15
sanitizer: add a test to make sure <figure> is intact
...
Somehow with the old approach, `<figure>` is rearranged into `<head>`,
and the latter is stripped by `Sanitizer::strip_harmful_tags()` (see
[1]). The issue is fixed by [2]. Here I added a test for the regression.
[1] https://community.tt-rss.org/t/unexpected-behavior-with-figure-tag/6244
[2] 67012f9dac
2023-12-18 22:46:35 +08:00
Andrew Dolgov
2b8e344532
add some unittest options for xmlrunner
2023-12-02 12:48:54 +03:00
Andrew Dolgov
e453befab6
fix filename
2023-12-02 12:47:36 +03:00
Andrew Dolgov
dbb6e7291e
enable unit test results for selenium
2023-12-02 12:44:21 +03:00
Andrew Dolgov
e52eaf0e7b
add sanitizer integration test
2023-12-02 11:14:07 +03:00
Andrew Dolgov
0b7d021f8e
add wait-for-element to selenium test
2023-11-01 13:40:35 +03:00
Andrew Dolgov
1be156408a
add some more phpunit api tests
2023-10-29 10:46:01 +03:00
Andrew Dolgov
7cd2c5cac8
fix apitest
2023-10-29 09:42:53 +03:00
Andrew Dolgov
adf3985afa
fix circular dependency
2023-10-29 09:25:01 +03:00
Andrew Dolgov
8b72d9ab11
add phpunit integration (wip)
2023-10-29 09:14:18 +03:00
Andrew Dolgov
855695a862
add stuff necessary to run integration tests using phpunit
2023-10-28 18:45:09 +03:00
Andrew Dolgov
0ac8710ea1
add always-failing mock of api test
2023-10-28 18:08:42 +03:00
Andrew Dolgov
d2424b9e4b
use python unittest for selenium tests
2023-10-28 11:11:13 +03:00
Andrew Dolgov
925256c81f
unify test class naming
2023-10-27 22:10:28 +03:00
Andrew Dolgov
5920ac814c
replace some dirname horrors with a separate unit-tested method
2023-10-27 22:07:28 +03:00
Andrew Dolgov
69c1c62992
add a workaround for make_self_url() when invoked off /api/ endpoint, add unit tests for this method
2023-10-24 22:27:27 +03:00
Andrew Dolgov
efd5d79dde
make sure we fail properly
2023-10-22 13:51:24 +03:00
Andrew Dolgov
db05575b2d
add configurable ns
2023-10-22 13:42:41 +03:00
Andrew Dolgov
ce3eb32076
un-mock test, use SELENIUM_IMAGE
2023-10-22 13:35:01 +03:00
Andrew Dolgov
752c692170
use CI_COMMIT_SHORT_SHA for selenium test mock
2023-10-22 12:46:39 +03:00
Andrew Dolgov
382d01e8db
update test filename
2023-10-22 11:19:56 +03:00
Andrew Dolgov
bde94dbf4b
add selenium mock
2023-10-22 10:57:58 +03:00
Andrew Dolgov
e35a4a1306
tests: add stub autoloader, add a few more rewrite_relative tests
2022-03-22 14:32:32 +03:00