ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
ilStudyProgrammeAutoCategoryTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
PHPUnit\Framework\TestCase
;
22
23
class
ilStudyProgrammeAutoCategoryTest
extends
TestCase
24
{
25
protected
int
$prg_obj_id
;
26
protected
int
$cat_ref_id
;
27
protected
int
$usr_id
;
28
protected
DateTimeImmutable
$dat
;
29
30
protected
function
setUp
(): void
31
{
32
$this->prg_obj_id = 123;
33
$this->cat_ref_id = 666;
34
$this->usr_id = 6;
35
$this->dat =
new
DateTimeImmutable
(
'2019-06-05 15:25:12'
);
36
}
37
38
public
function
testConstruction
():
ilStudyProgrammeAutoCategory
39
{
40
$ac =
new
ilStudyProgrammeAutoCategory
(
41
$this->prg_obj_id,
42
$this->cat_ref_id,
43
$this->usr_id,
44
$this->dat
45
);
46
$this->assertInstanceOf(
47
ilStudyProgrammeAutoCategory::class,
48
$ac
49
);
50
return
$ac;
51
}
52
53
#[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
54
public
function
testGetPrgObjId
(
ilStudyProgrammeAutoCategory
$ac): void
55
{
56
$this->assertEquals(
57
$this->prg_obj_id,
58
$ac->
getPrgObjId
()
59
);
60
}
61
62
#[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
63
public
function
testGetCategoryRefId
(
ilStudyProgrammeAutoCategory
$ac): void
64
{
65
$this->assertEquals(
66
$this->cat_ref_id,
67
$ac->
getCategoryRefId
()
68
);
69
}
70
71
#[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
72
public
function
testGetLastEditorId
(
ilStudyProgrammeAutoCategory
$ac): void
73
{
74
$this->assertEquals(
75
$this->usr_id,
76
$ac->
getLastEditorId
()
77
);
78
}
79
80
#[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
81
public
function
testGetLastEdited
(
ilStudyProgrammeAutoCategory
$ac): void
82
{
83
$this->assertEquals(
84
$this->dat,
85
$ac->
getLastEdited
()
86
);
87
}
88
}
ilStudyProgrammeAutoCategoryTest
Definition:
ilStudyProgrammeAutoCategoryTest.php:23
ilStudyProgrammeAutoCategoryTest\$usr_id
int $usr_id
Definition:
ilStudyProgrammeAutoCategoryTest.php:27
DateTimeImmutable
ilStudyProgrammeAutoCategoryTest\testGetCategoryRefId
testGetCategoryRefId(ilStudyProgrammeAutoCategory $ac)
Definition:
ilStudyProgrammeAutoCategoryTest.php:63
ilStudyProgrammeAutoCategory\getCategoryRefId
getCategoryRefId()
Definition:
class.ilStudyProgrammeAutoCategory.php:50
ilStudyProgrammeAutoCategoryTest\testGetLastEdited
testGetLastEdited(ilStudyProgrammeAutoCategory $ac)
Definition:
ilStudyProgrammeAutoCategoryTest.php:81
ilStudyProgrammeAutoCategoryTest\$prg_obj_id
int $prg_obj_id
Definition:
ilStudyProgrammeAutoCategoryTest.php:25
ilStudyProgrammeAutoCategory\getLastEdited
getLastEdited()
Definition:
class.ilStudyProgrammeAutoCategory.php:60
ilStudyProgrammeAutoCategoryTest\testConstruction
testConstruction()
Definition:
ilStudyProgrammeAutoCategoryTest.php:38
ilStudyProgrammeAutoCategoryTest\testGetPrgObjId
testGetPrgObjId(ilStudyProgrammeAutoCategory $ac)
Definition:
ilStudyProgrammeAutoCategoryTest.php:54
ilStudyProgrammeAutoCategoryTest\$dat
DateTimeImmutable $dat
Definition:
ilStudyProgrammeAutoCategoryTest.php:28
ilStudyProgrammeAutoCategory\getPrgObjId
getPrgObjId()
Definition:
class.ilStudyProgrammeAutoCategory.php:45
ilStudyProgrammeAutoCategoryTest\testGetLastEditorId
testGetLastEditorId(ilStudyProgrammeAutoCategory $ac)
Definition:
ilStudyProgrammeAutoCategoryTest.php:72
ilStudyProgrammeAutoCategory\getLastEditorId
getLastEditorId()
Definition:
class.ilStudyProgrammeAutoCategory.php:55
ilStudyProgrammeAutoCategory
Class ilStudyProgrammeAutoCategory.
Definition:
class.ilStudyProgrammeAutoCategory.php:26
ilStudyProgrammeAutoCategoryTest\$cat_ref_id
int $cat_ref_id
Definition:
ilStudyProgrammeAutoCategoryTest.php:26
ilStudyProgrammeAutoCategoryTest\setUp
setUp()
Definition:
ilStudyProgrammeAutoCategoryTest.php:30
TestCase
TestCase
components
ILIAS
StudyProgramme
tests
model
AutoCategories
ilStudyProgrammeAutoCategoryTest.php
Generated on Wed Sep 3 2025 23:03:54 for ILIAS by
1.8.13 (using
Doxyfile
)