<commit_before><?php

/**
 * PHPMailer - Base test class.
 * PHP version 5.5.
 *
 * @author    <NAME> <<EMAIL>>
 * @author    <NAME>
 * @copyright 2012 - 2020 <NAME>
 * @copyright 2004 - 2009 <NAME>
 * @license   http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
 */

namespace PHPMailer\Test;

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\Test\TestCase;

/**
 * PHPMailer - Test class for tests which need the `PHPMailer::preSend()` method to be called.
 */
abstract class PreSendTestCase extends TestCase
{

    /**
     * Run before each test is started.
     */
    protected function set_up()
    {
        parent::set_up();

        $this->Mail->Priority = 3;
        $this->Mail->Encoding = '8bit';
        $this->Mail->CharSet = PHPMailer::CHARSET_ISO88591;
        $this->Mail->From = '<EMAIL>';
        $this->Mail->FromName = 'Unit Tester';
        $this->Mail->Sender = '';
        $this->Mail->Subject = 'Unit Test';
        $this->Mail->Body = '';
        $this->Mail->AltBody = '';
        $this->Mail->WordWrap = 0;
        $this->Mail->Host = 'mail.example.com';
        $this->Mail->Port = 25;
        $this->Mail->Helo = 'localhost.localdomain';
        $this->Mail->SMTPAuth = false;
        $this->Mail->Username = '';
        $this->Mail->Password = '';
        $this->setAddress('<EMAIL>', 'Reply Guy', 'ReplyTo');
        $this->Mail->Sender = '<EMAIL>';
        $this->setAddress('<EMAIL>', 'Test User', 'to');

        if ($this->Mail->Host != '') {
            $this->Mail->isSMTP();
        } else {
            $this->Mail->isMail();
        }
    }
}<commit_msg>PreSendTestCase: implement use of the `$propertyChanges` property<commit_after><?php

/**
 * PHPMailer - Base test class.
 * PHP version 5.5.
 *
 * @author    <NAME> <<EMAIL>>
 * @author    <NAME>
 * @copyright 2012 - 2020 <NAME>
 * @copyright 2004 - 2009 <NAME>
 * @license   http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
 */

namespace PHPMailer\Test;

use PHPMailer\PHPMailer\PHPMailer;
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'],

        'Priority'    => 3,
        'Encoding'    => '8bit',
        'CharSet'     => PHPMailer::CHARSET_ISO88591,
        'From'        => '<EMAIL>',
        'FromName'    => 'Unit Tester',
        'Sender'      => '<EMAIL>',
        'Subject'     => 'Unit Test',
        'Body'        => '',
        'AltBody'     => '',
        'WordWrap'    => 0,
        'Host'        => 'mail.example.com',
        'Port'        => 25,
        'Helo'        => 'localhost.localdomain',
        'SMTPAuth'    => false,
        'Username'    => '',
        'Password'    => '',
        'ReplyTo'     => [
            'address' => '<EMAIL>',
            'name'    => '<NAME>',
        ],
        'to'          => [
            'address' => '<EMAIL>',
            'name'    => '<NAME>',
        ],
    ];
}
{'fraction_non_alphanumeric': 0.16685236768802228, 'fraction_numerical': 0.015598885793871866, 'mean_word_length': 2.098360655737705, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2850462', 'n_tokens_mistral': 1181, 'n_tokens_neox': 1135, 'n_words': 259}