Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ignitetch
GitHub Repository: ignitetch/advphishing
Path: blob/master/PHPMailer/test/DebugLogTestListener.php
738 views
1
<?php
2
/**
3
* PHPMailer - language file tests.
4
*
5
* PHP version 5.5.
6
*
7
* @author Marcus Bointon <[email protected]>
8
* @author Andy Prevost
9
* @copyright 2010 - 2020 Marcus Bointon
10
* @copyright 2004 - 2009 Andy Prevost
11
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
12
*/
13
14
namespace PHPMailer\Test;
15
16
class DebugLogTestListener extends \PHPUnit_Framework_BaseTestListener
17
{
18
private static $debugLog = '';
19
20
public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time)
21
{
22
echo self::$debugLog;
23
}
24
25
public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time)
26
{
27
echo self::$debugLog;
28
}
29
30
public function startTest(\PHPUnit_Framework_Test $test)
31
{
32
self::$debugLog = '';
33
}
34
35
public static function debugLog($str)
36
{
37
self::$debugLog .= $str . PHP_EOL;
38
}
39
}
40
41