ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
25
class
ilTermsOfServiceDocumentsContainsHtmlValidatorTest
extends
\PHPUnit\Framework\TestCase
26
{
27
public
function
textProvider
(): 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
}
39
45
public
function
testHtmlCanBeDetected
(
string
$text,
bool
$result): void
46
{
47
$validator =
new
ilTermsOfServiceDocumentsContainsHtmlValidator
($text);
48
$this->assertSame($result, $validator->isValid());
49
}
50
}
ilTermsOfServiceDocumentsContainsHtmlValidatorTest
Class ilTermsOfServiceTrimmedDocumentPurifierTest.
Definition:
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php:25
ilTermsOfServiceDocumentsContainsHtmlValidator
Class ilTermsOfServiceDocumentsContainsHtmlValidator.
Definition:
class.ilTermsOfServiceDocumentsContainsHtmlValidator.php:25
ilTermsOfServiceDocumentsContainsHtmlValidatorTest\testHtmlCanBeDetected
testHtmlCanBeDetected(string $text, bool $result)
textProvider
Definition:
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php:45
ilTermsOfServiceDocumentsContainsHtmlValidatorTest\textProvider
textProvider()
Definition:
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php:27
Services
TermsOfService
test
document
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php
Generated on Sun Apr 13 2025 22:02:46 for ILIAS by
1.8.13 (using
Doxyfile
)