ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilMailBodyPurifierTest Class Reference
+ Inheritance diagram for ilMailBodyPurifierTest:
+ Collaboration diagram for ilMailBodyPurifierTest:

Public Member Functions

 testMailBodyPurifier (string $body, string $expected_body)
 
 testCarriageReturnCharactersAreRemoved ()
 

Static Public Member Functions

static bodyProvider ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilMailBaseTestCase
 brutallyTrimHTML (string $html)
 
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 

Detailed Description

Definition at line 23 of file ilMailBodyPurifierTest.php.

Member Function Documentation

◆ bodyProvider()

static ilMailBodyPurifierTest::bodyProvider ( )
static

Definition at line 25 of file ilMailBodyPurifierTest.php.

25 : array
26 {
27 return [
28 'Reply indicators are kept' => [
29 '> This is the original message' . chr(10) . '> Stretching over multiple lines',
30 '> This is the original message' . chr(10) . '> Stretching over multiple lines',
31 ],
32 'Reply indicators are kept, even if body contains (supported and unsupported) HTML' => [
33 '> This is the original <b>message</b>' . chr(10) . '> <section>Stretching</section> over multiple lines',
34 '> This is the original < b>message< /b>' . chr(10) . '> < section>Stretching< /section> over multiple lines',
35 ]
36 ];
37 }

◆ testCarriageReturnCharactersAreRemoved()

ilMailBodyPurifierTest::testCarriageReturnCharactersAreRemoved ( )

Definition at line 47 of file ilMailBodyPurifierTest.php.

47 : void
48 {
49 $purifier = new ilMailBodyPurifier();
50
51 $this->assertStringNotContainsString(chr(13), $purifier->purify(chr(13)));
52 }

◆ testMailBodyPurifier()

ilMailBodyPurifierTest::testMailBodyPurifier ( string  $body,
string  $expected_body 
)

Definition at line 40 of file ilMailBodyPurifierTest.php.

40 : void
41 {
42 $purifier = new ilMailBodyPurifier();
43
44 $this->assertSame($expected_body, $purifier->purify($body));
45 }

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