0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 01:52:15 +02:00
PHPMailer/test
jrfnl ef35c0daa5 SendTestCase: error out when the testbootstrap file cannot be found
The `PHPMailerTest` class contained a `testBootstrap()` method to verify that the `testbootstrap.php` file exists as the first test in the class.
As the order in which tests are run is not predefined, this is not reliable.

Additionally, the check for the `testbootstrap.php` file is checking a pre-requisite for tests using the `PHPMailer::send()` method, so it would be better to verify via a condition in the `set_up()`.

Now, using such a condition, there is choice: the test can either be marked as "skipped" when the `testbootstrap.php` file can not be found, or be marked as an "error".

As the tests _should_ run, skipping them would hide an error in the dev-user test setup, so showing these tests as errors seems more appropriate.

To that end, the `testBootstrap()` method has been removed and a check for the `testbootstrap.php` file has been added to the `SendTestCase::set_up()` which will now throw an appropriate `Exception` when the file is not found.

Oops... also removes a stray `parent::set_up()` at the start of the local `set_up()` which should have been removed in 218fd13c88
2021-07-06 21:39:41 +02:00
..
Language PHPMailerLangTest: rename and minor tweaks (#2377) 2021-06-23 23:04:15 +02:00
OAuth Tests: move OAuth test to own file (#2383) 2021-06-24 19:19:36 +02:00
PHPMailer SendTestCase: error out when the testbootstrap file cannot be found 2021-07-06 21:39:41 +02:00
POP3 PopBeforeSmtpTest: skip on Windows 2021-06-29 12:36:07 +02:00
DebugLogTestListener.php Make the tests PHPUnit cross version compatible + test on PHP 8 (#2202) 2020-11-25 15:35:50 +01:00
fakefunctions.php Decode encoded names in the address parser, see #2266 2021-02-18 11:46:07 +01:00
fakepopserver.sh Update copyright year 2020-09-02 08:41:14 +02:00
fakesendmail.sh Minor fixes, code style 2016-08-31 10:26:06 +02:00
PreSendTestCase.php PreSendTestCase: reduce amount of properties being preset 2021-07-06 20:05:35 +02:00
runfakepopserver.sh See what's happening in the shell 2015-11-24 19:04:12 +01:00
SendTestCase.php SendTestCase: error out when the testbootstrap file cannot be found 2021-07-06 21:39:41 +02:00
testbootstrap-dist.php Big cleanup for Symfony coding style and php-cs-fixer, see #1148 2017-09-07 18:21:09 +02:00
TestCase.php TestCase::checkChanges(): make dynamic 2021-07-06 20:05:35 +02:00
validators.php Add tests for injected validators 2021-06-15 14:54:40 +02:00