ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
ilMailBaseTestCase Class Reference
+ Inheritance diagram for ilMailBaseTestCase:
+ Collaboration diagram for ilMailBaseTestCase:

Protected Member Functions

 brutallyTrimHTML (string $html)
 
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 

Private Attributes

Container $dic = null
 

Detailed Description

Definition at line 26 of file ilMailBaseTestCase.php.

Member Function Documentation

◆ brutallyTrimHTML()

ilMailBaseTestCase::brutallyTrimHTML ( string  $html)
protected

Definition at line 30 of file ilMailBaseTestCase.php.

30 : string
31 {
32 $html = str_replace(["\n", "\r", "\t"], '', $html);
33 $html = preg_replace('# {2,}#', ' ', $html);
34 $html = preg_replace('/<!--(.|\s)*?-->/', '', $html);
35 $html = preg_replace("/>(\s+)</", '><', $html);
36 $html = str_replace([' >', ' <'], ['>', '<'], $html);
37
38 return trim($html);
39 }

Referenced by ilMailErrorFormatterTest\testErrorFormatter().

+ Here is the caller graph for this function:

◆ setGlobalVariable()

◆ setUp()

ilMailBaseTestCase::setUp ( )
protected

Reimplemented in ilMailAddressTypesTest, ilMailErrorFormatterTest, ilMailMimeTest, ilMailOptionsTest, and ilMailTaskProcessorTest.

Definition at line 41 of file ilMailBaseTestCase.php.

41 : void
42 {
43 if (!defined('ANONYMOUS_USER_ID')) {
44 define('ANONYMOUS_USER_ID', 13);
45 }
46
47 global $DIC;
48
49 $this->dic = is_object($DIC) ? clone $DIC : $DIC;
50
51 $DIC = new Container();
52 $DIC['legalDocuments'] = fn() => $this->getMockBuilder(Conductor::class)->disableOriginalConstructor()->getMock();
53
55
56 parent::setUp();
57 }

References $DIC, and init().

+ Here is the call graph for this function:

◆ tearDown()

ilMailBaseTestCase::tearDown ( )
protected

Definition at line 59 of file ilMailBaseTestCase.php.

59 : void
60 {
61 global $DIC;
62
64
65 parent::tearDown();
66 }

References $DIC, and $dic.

Field Documentation

◆ $dic

Container ilMailBaseTestCase::$dic = null
private

Definition at line 28 of file ilMailBaseTestCase.php.

Referenced by tearDown().


The documentation for this class was generated from the following file: