ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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)
 textProvider More...
 

Static Public Member Functions

static textProvider ()
 

Detailed Description

Definition at line 26 of file ValidHTMLTest.php.

Member Function Documentation

◆ testConstruct()

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

Definition at line 28 of file ValidHTMLTest.php.

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

◆ testIsTrue()

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

textProvider

Parameters
string$text
bool$result

Definition at line 38 of file ValidHTMLTest.php.

38  : void
39  {
40  $instance = new ValidHTML();
41  $this->assertSame($result, $instance->isTrue($text));
42  }

◆ textProvider()

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

Definition at line 44 of file ValidHTMLTest.php.

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

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