ILIAS  release_8 Revision v8.25
ilTermsOfServiceDocumentsContainsHtmlValidatorTest Class Reference

Class ilTermsOfServiceTrimmedDocumentPurifierTest. More...

+ Inheritance diagram for ilTermsOfServiceDocumentsContainsHtmlValidatorTest:
+ Collaboration diagram for ilTermsOfServiceDocumentsContainsHtmlValidatorTest:

Public Member Functions

 textProvider ()
 
 testHtmlCanBeDetected (string $text, bool $result)
 @dataProvider textProvider More...
 

Detailed Description

Member Function Documentation

◆ testHtmlCanBeDetected()

ilTermsOfServiceDocumentsContainsHtmlValidatorTest::testHtmlCanBeDetected ( string  $text,
bool  $result 
)

@dataProvider textProvider

Parameters
string$text
bool$result

Definition at line 45 of file ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php.

45 : void
46 {
48 $this->assertSame($result, $validator->isValid());
49 }

◆ textProvider()

ilTermsOfServiceDocumentsContainsHtmlValidatorTest::textProvider ( )

Definition at line 27 of file ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php.

27 : array
28 {
29 return [
30 'Plain Text' => ['phpunit', false,],
31 'HTML Fragment' => ['php<b>unit</b>', true,],
32 'HTML Fragment with Email Address Wrapped in <>' => ['php<b>unit</b> <info@ilias.de>', false,],
33 'HTML' => ['<html><body>php<b>unit</b></body></html>', true,],
34 'HTML with Email Address Wrapped in <>' => ['<html><body>php<b>unit</b>Php Unit <info@ilias.de></body></html>', false,],
35 'HTML with Unsupported Entities' => ['<html><body>php<b>unit</b>Php Unit<figure></figure></body></html>', true,],
36 'Invalid HTML' => ['<html><body>php<b>unit</b>Php Unit<div </body></html>', false,],
37 ];
38 }

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