ILIAS
trunk Revision v11.0_alpha-2645-g16283d3b3f8
◀ ilDoc Overview
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 Mon Sep 1 2025 23:02:49 for ILIAS by
1.8.13 (using
Doxyfile
)