ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\LegalDocuments\test\ValidHTMLTest Class Reference
+ Inheritance diagram for ILIAS\LegalDocuments\test\ValidHTMLTest:
+ Collaboration diagram for ILIAS\LegalDocuments\test\ValidHTMLTest:

Public Member Functions

 testConstruct ()
 
 testIsTrue (string $text, bool $result)
 

Static Public Member Functions

static textProvider ()
 

Detailed Description

Definition at line 27 of file ValidHTMLTest.php.

Member Function Documentation

◆ testConstruct()

ILIAS\LegalDocuments\test\ValidHTMLTest::testConstruct ( )

Definition at line 29 of file ValidHTMLTest.php.

29 : void
30 {
31 $this->assertInstanceOf(ValidHTML::class, new ValidHTML());
32 }

◆ testIsTrue()

ILIAS\LegalDocuments\test\ValidHTMLTest::testIsTrue ( string  $text,
bool  $result 
)

Definition at line 35 of file ValidHTMLTest.php.

35 : void
36 {
37 $instance = new ValidHTML();
38 $this->assertSame($result, $instance->isTrue($text));
39 }

◆ textProvider()

static ILIAS\LegalDocuments\test\ValidHTMLTest::textProvider ( )
static

Definition at line 41 of file ValidHTMLTest.php.

41 : array
42 {
43 return [
44 'Plain Text' => ['phpunit', false],
45 'HTML Fragment' => ['php<b>unit</b>', true],
46 'HTML Fragment with Email Address Wrapped in <>' => ['php<b>unit</b> <info@ilias.de>', false],
47 'HTML' => ['<html><body>php<b>unit</b></body></html>', true],
48 'HTML with Email Address Wrapped in <>' => ['<html><body>php<b>unit</b>Php Unit <info@ilias.de></body></html>', false],
49 'HTML with Unsupported Entities' => ['<html><body>php<b>unit</b>Php Unit<figure></figure></body></html>', true],
50 'Invalid HTML' => ['<html><body>php<b>unit</b>Php Unit<div </body></html>', false],
51 ];
52 }

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