aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/includes/NetworkTest.php
Commit message (Collapse)AuthorAgeFilesLines
* tests: Configure system.baseurl for tests.Harald Eilertsen2024-06-131-7/+1
|
* Upgrade test framework to PHPUnit 10.5Harald Eilertsen2024-05-271-2/+2
|
* Improve the validate_email functionHarald Eilertsen2024-01-151-25/+64
| | | | | | | | | | | | | | | | | | | | The validate_email function relied on doing an actual domain lookup (on supported platforms) to validate the domain of the email address. This does not work too well in testing environments where we may not want to spam the DNS system, if it at all is available. Apart from the the function did very little to actually verify that it was a valid email address. This patch tries to change that by usng a somewhat stricted regex based validation. While this may not be perfect, it should be good enough in the vast majority of cases. For platforms where no validation was performed with the old version, it will at least be an improvement. Also, it allows testing without having an external network connection. Also clarify the doc comment, that it does not actually try to resolve the email address, just the domain.
* Add function is_local_url() to check if url is local.Harald Eilertsen2022-03-201-0/+33