forked from PHPMailer/PHPMailer
-
Notifications
You must be signed in to change notification settings - Fork 901
/
PreSendTestCase.php
46 lines (41 loc) · 1.37 KB
/
PreSendTestCase.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* PHPMailer - Base test class.
* PHP version 5.5.
*
* @author Marcus Bointon <[email protected]>
* @author Andy Prevost
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2004 - 2009 Andy Prevost
* @license http:https://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
*/
namespace PHPMailer\Test;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\Test\TestCase;
/**
* PHPMailer - Test class for tests which need the `PHPMailer::preSend()` method to be called.
*/
abstract class PreSendTestCase extends TestCase
{
/**
* Property names and their values for the test instance of the PHPMailer class.
*
* These 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.
*
* @var array
*/
protected $propertyChanges = [
// Generic changes.
'SMTPDebug' => SMTP::DEBUG_CONNECTION, // Full debug output.
'Debugoutput' => ['PHPMailer\Test\DebugLogTestListener', 'debugLog'],
// Minimal set of properties which are needed for the preSend() command to succeed.
'From' => '[email protected]',
'to' => [
'address' => '[email protected]',
'name' => 'Test User',
],
];
}