USE_EXCEPTIONS
USE_EXCEPTIONS = null : bool|null
Whether or not to initialize the PHPMailer object to throw exceptions.
Overload this constant in a concrete test class and set the value to true
to initialize PHPMailer with Exceptions turned on.
Test reply-to address setting, getting and clearing functionality.
$propertyChanges : array
Property names and their values for the test instance of the PHPMailer class.
These (public) properties will be set in the set_up()
method.
This property can be enhanced/overloaded in concrete test classes to change the presets or add additional properties.
It is the responsibility of the individual test classes to ensure that property values of the correct type are passed.
$Mail : \PHPMailer\PHPMailer\PHPMailer
Holds the PHPMailer instance.
$ChangeLog : string[]
Holds the change log.
$NoteLog : string[]
Holds the note log.
$PHPMailerStaticProps : array
List of *static* properties in the PHPMailer class which _may_ be changed from within a test, with their default values.
This list is used by the {@see TestCase::resetStaticProperties()
} method, as well as
in the {@see TestCase::checkChanges()
} method.
updateStaticProperty(string $className, string $propertyName, mixed $value) : mixed
Update the value of a - potentially inaccessible - static property in a class.
string | $className | The target class. |
string | $propertyName | The name of the static property. |
mixed | $value | The new value for the property. |
testAddReplyToValidAddressNonIdn(string $address, string $name = null, string $expected = null) : mixed
Test adding a non-IDN reply-to address.
string | $address | The email address to set. |
string | $name | Optional. The name to set. |
string | $expected | Optional. The email address and name as they are expected to be set. Only needs to be passed if different than the original inputs. |
testReplyToInMessageHeader(string $addresses, string $expected) : mixed
Test that the correct Reply-To message header has been added to the message.
string | $addresses | The email address(es) to set for Reply-To. |
string | $expected | The expected message header. |
testEnqueueAndAddIdnAddress() : mixed
Tests handling of IDN reply-to addresses.
Verifies that:
preSend()
.testAddReplyToFailsOn8BitCharInDomainWithoutOptionalExtensions() : mixed
Test unsuccesfully adding an Reply-to address when an email address containing an 8bit character is passed and either the MbString or the Intl extension are not available.