ILIAS
trunk Revision v11.0_alpha-1769-g99a433fe2dc
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
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
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
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
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
FilenameSanitizing.php
Go to the documentation of this file.
1
<?php
2
19
namespace
ILIAS\Filesystem\Util
;
20
21
use
PHPUnit\Framework\Attributes\DataProvider
;
22
use
PHPUnit\Framework\TestCase
;
23
use
ILIAS\Filesystem\Util
;
24
28
class
FilenameSanitizing
extends
TestCase
29
{
30
public
static
function
provideFilenames
(): array
31
{
32
return
[
33
[
"Control\u{00a0}Character"
,
'ControlCharacter'
],
34
[
"Soft\u{00ad}Hyphen"
,
'SoftHyphen'
],
35
[
"No\u{0083}Break"
,
'NoBreak'
],
36
[
"ZeroWidth\u{200C}NonJoiner"
,
'ZeroWidthNonJoiner'
],
37
[
"ZeroWidth\u{200d}Joiner"
,
'ZeroWidthJoiner'
],
38
[
"Invisible\u{2062}Times"
,
'InvisibleTimes'
],
39
[
"Invisible\u{2063}Comma"
,
'InvisibleComma'
],
40
[
"Funky\u{200B}Whitespace"
,
'FunkyWhitespace'
],
41
];
42
}
43
44
#[DataProvider('provideFilenames')]
45
public
function
testSanitize
(
string
$filename
,
string
$expected): void
46
{
47
$this->assertEquals($expected, Util::sanitizeFilename($filename));
48
}
49
}
ILIAS\Filesystem\Util\FilenameSanitizing\testSanitize
testSanitize(string $filename, string $expected)
Definition:
FilenameSanitizing.php:45
ILIAS\Filesystem\Util\FilenameSanitizing\provideFilenames
static provideFilenames()
Definition:
FilenameSanitizing.php:30
ILIAS\Filesystem\Util\FilenameSanitizing
Definition:
FilenameSanitizing.php:28
ILIAS\Filesystem\Util
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$filename
$filename
Definition:
buildRTE.php:78
DataProvider
TestCase
components
ILIAS
Filesystem
tests
Util
FilenameSanitizing.php
Generated on Sun Apr 13 2025 23:02:58 for ILIAS by
1.8.13 (using
Doxyfile
)