ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
9 {
13  public function textProvider() : array
14  {
15  return [
16  ['phpunit', false, ],
17  ['php<b>unit</b>', true, ],
18  ['php<b>unit</b> <info@ilias.de>', false, ],
19  ['<html><body>php<b>unit</b></body></html>', true, ],
20  ['<html><body>php<b>unit</b>Php Unit <info@ilias.de></body></html>', false, ],
21  ];
22  }
23 
29  public function testHtmlCanBeDetected(string $text, bool $result)
30  {
31  $validator = new \ilTermsOfServiceDocumentsContainsHtmlValidator($text);
32  $this->assertEquals($result, $validator->isValid());
33  }
34 }
$result
Class ilTermsOfServiceCriterionBaseTest.
$text
Definition: errorreport.php:18