ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ILIAS\Skill\Profile\SkillProfileTest Class Reference
+ Inheritance diagram for ILIAS\Skill\Profile\SkillProfileTest:
+ Collaboration diagram for ILIAS\Skill\Profile\SkillProfileTest:

Public Member Functions

 testProfileProperties ()
 
 testProfileLevelProperties ()
 
 testProfileCompletionProperties ()
 
 testProfileUserAssignmentProperties ()
 
 testProfileRoleAssignmentProperties ()
 
 testProfileAssignmentInstanceOfInterface ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

SkillProfile $profile
 
SkillProfileLevel $profile_level
 
SkillProfileCompletion $profile_completion
 
SkillProfileUserAssignment $profile_user_assignment
 
SkillProfileRoleAssignment $profile_role_assignment
 

Detailed Description

Author
Thomas Famula famul.nosp@m.a@le.nosp@m.ifos..nosp@m.de

Definition at line 29 of file SkillProfileTest.php.

Member Function Documentation

◆ setUp()

ILIAS\Skill\Profile\SkillProfileTest::setUp ( )
protected

Definition at line 37 of file SkillProfileTest.php.

References ILIAS\Repository\profile().

37  : void
38  {
39  parent::setUp();
40 
41  $this->profile = new SkillProfile(
42  11,
43  "My profile",
44  "This is my profile",
45  12,
46  "my_profile_image_id"
47  );
48  $this->profile_level = new SkillProfileLevel(
49  21,
50  22,
51  23,
52  24,
53  25
54  );
55  $this->profile_completion = new SkillProfileCompletion(
56  31,
57  32,
58  "1999-01-01 12:12:12",
59  true
60  );
61  $this->profile_user_assignment = new SkillProfileUserAssignment(
62  "My user",
63  41
64  );
65  $this->profile_role_assignment = new SkillProfileRoleAssignment(
66  "My role",
67  51,
68  "My object",
69  "My object type",
70  52
71  );
72  }
+ Here is the call graph for this function:

◆ testProfileAssignmentInstanceOfInterface()

ILIAS\Skill\Profile\SkillProfileTest::testProfileAssignmentInstanceOfInterface ( )

Definition at line 200 of file SkillProfileTest.php.

References ILIAS\Skill\Profile\SkillProfileTest\$profile_role_assignment, and ILIAS\Skill\Profile\SkillProfileTest\$profile_user_assignment.

200  : void
201  {
204 
205  $this->assertInstanceOf(SkillProfileAssignmentInterface::class, $pu);
206  $this->assertInstanceOf(SkillProfileAssignmentInterface::class, $pr);
207  }
SkillProfileRoleAssignment $profile_role_assignment
SkillProfileUserAssignment $profile_user_assignment

◆ testProfileCompletionProperties()

ILIAS\Skill\Profile\SkillProfileTest::testProfileCompletionProperties ( )

Definition at line 130 of file SkillProfileTest.php.

References ILIAS\Skill\Profile\SkillProfileTest\$profile_completion.

130  : void
131  {
133 
134  $this->assertEquals(
135  31,
136  $pc->getProfileId()
137  );
138  $this->assertEquals(
139  32,
140  $pc->getUserId()
141  );
142  $this->assertEquals(
143  "1999-01-01 12:12:12",
144  $pc->getDate()
145  );
146  $this->assertEquals(
147  true,
148  $pc->getFulfilled()
149  );
150  }
SkillProfileCompletion $profile_completion

◆ testProfileLevelProperties()

ILIAS\Skill\Profile\SkillProfileTest::testProfileLevelProperties ( )

Definition at line 104 of file SkillProfileTest.php.

References ILIAS\Skill\Profile\SkillProfileTest\$profile_level.

104  : void
105  {
106  $pl = $this->profile_level;
107 
108  $this->assertEquals(
109  21,
110  $pl->getProfileId()
111  );
112  $this->assertEquals(
113  22,
114  $pl->getBaseSkillId()
115  );
116  $this->assertEquals(
117  23,
118  $pl->getTrefId()
119  );
120  $this->assertEquals(
121  24,
122  $pl->getLevelId()
123  );
124  $this->assertEquals(
125  25,
126  $pl->getOrderNr()
127  );
128  }

◆ testProfileProperties()

ILIAS\Skill\Profile\SkillProfileTest::testProfileProperties ( )

Definition at line 74 of file SkillProfileTest.php.

References ILIAS\Skill\Profile\SkillProfileTest\$profile.

74  : void
75  {
76  $p = $this->profile;
77 
78  $this->assertEquals(
79  11,
80  $p->getId()
81  );
82  $this->assertEquals(
83  "My profile",
84  $p->getTitle()
85  );
86  $this->assertEquals(
87  "This is my profile",
88  $p->getDescription()
89  );
90  $this->assertEquals(
91  12,
92  $p->getSkillTreeId()
93  );
94  $this->assertEquals(
95  "my_profile_image_id",
96  $p->getImageId()
97  );
98  $this->assertEquals(
99  0,
100  $p->getRefId()
101  );
102  }

◆ testProfileRoleAssignmentProperties()

ILIAS\Skill\Profile\SkillProfileTest::testProfileRoleAssignmentProperties ( )

Definition at line 170 of file SkillProfileTest.php.

References ILIAS\Skill\Profile\SkillProfileTest\$profile_role_assignment.

170  : void
171  {
173 
174  $this->assertEquals(
175  "role",
176  $pr->getType()
177  );
178  $this->assertEquals(
179  "My role",
180  $pr->getName()
181  );
182  $this->assertEquals(
183  51,
184  $pr->getId()
185  );
186  $this->assertEquals(
187  "My object",
188  $pr->getObjTitle()
189  );
190  $this->assertEquals(
191  "My object type",
192  $pr->getObjType()
193  );
194  $this->assertEquals(
195  52,
196  $pr->getObjId()
197  );
198  }
SkillProfileRoleAssignment $profile_role_assignment

◆ testProfileUserAssignmentProperties()

ILIAS\Skill\Profile\SkillProfileTest::testProfileUserAssignmentProperties ( )

Definition at line 152 of file SkillProfileTest.php.

References ILIAS\Skill\Profile\SkillProfileTest\$profile_user_assignment.

152  : void
153  {
155 
156  $this->assertEquals(
157  "user",
158  $pu->getType()
159  );
160  $this->assertEquals(
161  "My user",
162  $pu->getName()
163  );
164  $this->assertEquals(
165  41,
166  $pu->getId()
167  );
168  }
SkillProfileUserAssignment $profile_user_assignment

Field Documentation

◆ $profile

SkillProfile ILIAS\Skill\Profile\SkillProfileTest::$profile
protected

◆ $profile_completion

SkillProfileCompletion ILIAS\Skill\Profile\SkillProfileTest::$profile_completion
protected

◆ $profile_level

SkillProfileLevel ILIAS\Skill\Profile\SkillProfileTest::$profile_level
protected

◆ $profile_role_assignment

◆ $profile_user_assignment


The documentation for this class was generated from the following file: