mirror of
https://github.com/PHPMailer/PHPMailer.git
synced 2024-09-20 01:52:15 +02:00
ef35c0daa5
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
|
||
---|---|---|
.. | ||
Language | ||
OAuth | ||
PHPMailer | ||
POP3 | ||
DebugLogTestListener.php | ||
fakefunctions.php | ||
fakepopserver.sh | ||
fakesendmail.sh | ||
PreSendTestCase.php | ||
runfakepopserver.sh | ||
SendTestCase.php | ||
testbootstrap-dist.php | ||
TestCase.php | ||
validators.php |