1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-01 11:12:35 +02:00

bounce handler test and sample bounced email added.

This commit is contained in:
Cameron 2019-04-15 17:33:56 -07:00
parent 9775361b51
commit 36968631c8
2 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,37 @@
Return-path: <bounce-newsletter@e107.org>
Received: from e107 by secure.awscloudservices.net with local (Exim 4.91)
(envelope-from <bounce-newsletter@e107.org>)
id 1hG9qV-0002Ux-RO
for bounce-newsletter@e107.org; Mon, 15 Apr 2019 15:12:59 -0700
To: Bounce handler <bounce-newsletter@e107.org>
Subject: Test Bounce
X-PHP-Script: www.e107.org/e107_admin/mailout.php for 98.160.237.154
X-PHP-Originating-Script: 1010:class.phpmailer.php
Date: Mon, 15 Apr 2019 16:12:59 -0600
From: "e107.org" <noreply@e107.org>
Message-ID: <b32e962004f61de78186edcc7a1c7e2e@www.e107.org>
X-Mailer: PHPMailer 5.2.27 (https://github.com/PHPMailer/PHPMailer)
X-e107-id: 99999999
X-Bounce-Test: true
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="b1_b32e962004f61de78186edcc7a1c7e2e"
Content-Transfer-Encoding: 8bit
This is a multi-part message in MIME format.
--b1_b32e962004f61de78186edcc7a1c7e2e
Content-Type: text/plain; charset=us-ascii
Test Bounce Email address
--b1_b32e962004f61de78186edcc7a1c7e2e
Content-Type: text/html; charset=us-ascii
Test Bounce Email address
--b1_b32e962004f61de78186edcc7a1c7e2e--

View File

@ -0,0 +1,70 @@
<?php
/**
* e107 website system
*
* Copyright (C) 2008-2019 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
class e107BounceTest extends \Codeception\Test\Unit
{
/** @var e107Bounce */
protected $bnc;
protected function _before()
{
// define('e107_INIT', true);
parent::_before();
global $_E107;
$_E107['phpunit'] = true;
require_once(e_HANDLER."bounce_handler.php");
try
{
$this->bnc = $this->make('e107Bounce');
}
catch(Exception $e)
{
$this->assertTrue(false, "Couldn't load e107Bounce object");
}
}
public function testProcess()
{
$path = $icon = codecept_data_dir()."eml/bounced_01.eml";
$this->bnc->setSource($path);
$result = $this->bnc->process(false);
$this->assertEquals("99999999", $result);
}
public function testSetUser_Bounced()
{
}
public function test__construct()
{
}
public function testGetHeader()
{
}
public function testMailRead()
{
}
}