ILIAS
trunk Revision v11.0_alpha-1753-gb21ca8c4367
◀ 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
PCDefinitionTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\COPage\Test\PC
;
22
23
use
PHPUnit\Framework\TestCase
;
24
28
class
PCDefinitionTest
extends
\COPageTestBase
29
{
30
public
function
testGetPCDefinitionByType
(): void
31
{
32
$def = $this->
getPCDefinition
();
33
$pc_def = $def->getPCDefinitionByType(
"par"
);
34
35
$this->assertEquals(
36
"Paragraph"
,
37
$pc_def[
"name"
]
38
);
39
}
40
41
public
function
testGetPCDefinitionByName
(): void
42
{
43
$def = $this->
getPCDefinition
();
44
$pc_def = $def->getPCDefinitionByName(
"Paragraph"
);
45
46
$this->assertEquals(
47
"par"
,
48
$pc_def[
"pc_type"
]
49
);
50
}
51
52
public
function
testGetPCDefinitionByGUIClassName
(): void
53
{
54
$def = $this->
getPCDefinition
();
55
$pc_def = $def->getPCDefinitionByGUIClassName(
"ilPCParagraphGUI"
);
56
57
$this->assertEquals(
58
"par"
,
59
$pc_def[
"pc_type"
]
60
);
61
}
62
63
public
function
testIsPCGUIClassName
(): void
64
{
65
$def = $this->
getPCDefinition
();
66
67
$this->assertEquals(
68
true
,
69
$def->isPCGUIClassName(
"ilPCParagraphGUI"
)
70
);
71
72
$this->assertEquals(
73
false
,
74
$def->isPCGUIClassName(
"xyz"
)
75
);
76
}
77
78
public
function
testGetPCEditorInstanceByName
(): void
79
{
80
$def = $this->
getPCDefinition
();
81
$pc_ed = $def->getPCEditorInstanceByName(
"Paragraph"
);
82
83
$this->assertEquals(
84
"ilPCParagraphEditorGUI"
,
85
get_class($pc_ed)
86
);
87
}
88
}
COPageTestBase
Definition:
COPageTestBase.php:24
PHPUnit::Framework::Attributes\Test::PC\PCDefinitionTest\testGetPCDefinitionByName
testGetPCDefinitionByName()
Definition:
PCDefinitionTest.php:41
PHPUnit::Framework::Attributes\Test::PC\PCDefinitionTest\testGetPCDefinitionByType
testGetPCDefinitionByType()
Definition:
PCDefinitionTest.php:30
ILIAS\COPage\Test\PC
PHPUnit::Framework::Attributes\Test::PC\PCDefinitionTest
Definition:
PCDefinitionTest.php:28
COPageTestBase\getPCDefinition
getPCDefinition()
Definition:
COPageTestBase.php:152
PHPUnit::Framework::Attributes\Test::PC\PCDefinitionTest\testGetPCEditorInstanceByName
testGetPCEditorInstanceByName()
Definition:
PCDefinitionTest.php:78
PHPUnit::Framework::Attributes\Test::PC\PCDefinitionTest\testIsPCGUIClassName
testIsPCGUIClassName()
Definition:
PCDefinitionTest.php:63
PHPUnit::Framework::Attributes\Test::PC\PCDefinitionTest\testGetPCDefinitionByGUIClassName
testGetPCDefinitionByGUIClassName()
Definition:
PCDefinitionTest.php:52
TestCase
components
ILIAS
COPage
tests
PC
PCDefinitionTest.php
Generated on Thu Apr 10 2025 23:02:57 for ILIAS by
1.8.13 (using
Doxyfile
)