ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
ilMailBaseTest Class Reference

Class ilMailBaseTest. More...

+ Inheritance diagram for ilMailBaseTest:
+ Collaboration diagram for ilMailBaseTest:

Protected Member Functions

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

Private Attributes

Container $dic = null
 

Detailed Description

Class ilMailBaseTest.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 28 of file ilMailBaseTest.php.

Member Function Documentation

◆ brutallyTrimHTML()

ilMailBaseTest::brutallyTrimHTML ( string  $html)
protected

Definition at line 32 of file ilMailBaseTest.php.

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

Referenced by ilMailErrorFormatterTest\testErrorFormatter().

+ Here is the caller graph for this function:

◆ setGlobalVariable()

ilMailBaseTest::setGlobalVariable ( string  $name,
  $value 
)
protected

◆ setUp()

ilMailBaseTest::setUp ( )
protected

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

Definition at line 43 of file ilMailBaseTest.php.

43 : void
44 {
45 if (!defined('ANONYMOUS_USER_ID')) {
46 define('ANONYMOUS_USER_ID', 13);
47 }
48
49 global $DIC;
50
51 $this->dic = is_object($DIC) ? clone $DIC : $DIC;
52
53 $DIC = new Container();
54
55 parent::setUp();
56 }

References $DIC.

◆ tearDown()

ilMailBaseTest::tearDown ( )
protected

Definition at line 58 of file ilMailBaseTest.php.

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

References $DIC, and $dic.

Field Documentation

◆ $dic

Container ilMailBaseTest::$dic = null
private

Definition at line 30 of file ilMailBaseTest.php.

Referenced by tearDown().


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