ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ 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
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
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
q
r
s
t
u
v
w
x
z
+
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
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php
Go to the documentation of this file.
1
<?php declare(strict_types=1);
2
/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8
class
ilTermsOfServiceDocumentsContainsHtmlValidatorTest
extends
ilTermsOfServiceCriterionBaseTest
9
{
13
public
function
textProvider
() : array
14
{
15
return
[
16
'Plain Text'
=> [
'phpunit'
,
false
,],
17
'HTML Fragment'
=> [
'php<b>unit</b>'
,
true
,],
18
'HTML Fragment with Email Address Wrapped in <>'
=> [
'php<b>unit</b> <info@ilias.de>'
,
false
,],
19
'HTML'
=> [
'<html><body>php<b>unit</b></body></html>'
,
true
,],
20
'HTML with Email Address Wrapped in <>'
=> [
'<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
) : void
30
{
31
$validator =
new
ilTermsOfServiceDocumentsContainsHtmlValidator
($text);
32
$this->assertEquals($result, $validator->isValid());
33
}
34
}
ilTermsOfServiceDocumentsContainsHtmlValidatorTest
Class ilTermsOfServiceTrimmedDocumentPurifierTest.
Definition:
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php:8
$result
$result
Definition:
CleanUpTest.php:463
ilTermsOfServiceCriterionBaseTest
Class ilTermsOfServiceCriterionBaseTest.
Definition:
ilTermsOfServiceCriterionBaseTest.php:10
ilTermsOfServiceDocumentsContainsHtmlValidator
Class ilTermsOfServiceDocumentsContainsHtmlValidator.
Definition:
class.ilTermsOfServiceDocumentsContainsHtmlValidator.php:8
ilTermsOfServiceDocumentsContainsHtmlValidatorTest\testHtmlCanBeDetected
testHtmlCanBeDetected(string $text, bool $result)
textProvider
Definition:
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php:29
ilTermsOfServiceDocumentsContainsHtmlValidatorTest\textProvider
textProvider()
Definition:
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php:13
Services
TermsOfService
test
document
ilTermsOfServiceDocumentsContainsHtmlValidatorTest.php
Generated on Sun Apr 6 2025 21:01:41 for ILIAS by
1.8.13 (using
Doxyfile
)