1<?
php declare(strict_types=1);
8 $this->assertEquals($spp->getId(), 123);
18 $this->assertEquals($spp->getAssignmentId(), 321);
27 $this->assertEquals($spp->getNodeId(), 321);
36 $this->assertEquals($spp->getUserId(), 321);
45 $this->assertEquals($spp->getAmountOfPoints(), 321);
53 $this->expectException(\ilException::class);
63 $this->assertEquals($spp->getCurrentAmountOfPoints(), 321);
83 $this->assertEquals($spp->getStatus(), $status);
91 $this->expectException(\ilException::class);
101 $this->assertEquals($spp->getCompletionBy(), 321);
110 $this->assertEquals($spp->getLastChangeBy(), 6);
118 $this->expectException(\ilException::class);
127 $this->expectException(\ilException::class);
136 $ad =
new DateTime();
138 $this->assertEquals($spp->getAssignmentDate()->format(
'Y-m-d'), $ad->format(
'Y-m-d'));
146 $cd =
new DateTime();
148 $this->assertEquals($spp->getCompletionDate()->format(
'Y-m-d'), $cd->format(
'Y-m-d'));
150 $this->assertNull($spp->getCompletionDate());
158 $dl =
new DateTime();
160 $this->assertEquals($spp->getDeadline()->format(
'Y-m-d'), $dl->format(
'Y-m-d'));
168 $dl = DateTime::createFromFormat(
'Ymd',
'20201011');
170 $this->assertEquals($spp->getValidityOfQualification()->format(
'Ymd'),
'20201011');
179 $this->assertFalse($spp->isInvalidated());
180 $past = DateTime::createFromFormat(
'Ymd',
'20180101');
181 $spp->setValidityOfQualification($past);
183 $this->assertTrue($spp->isInvalidated());
191 $this->expectException(\ilException::class);
192 $tomorrow =
new DateTime();
193 $tomorrow->add(
new DateInterval(
'P1D'));
202 $this->expectException(\ilException::class);
An exception for terminatinating execution or to throw for unit testing.
test_amount_of_points_invalid()
@depends test_init_and_id
test_current_amount_of_points()
@depends test_init_and_id
test_invalidate_non_expired_2()
@depends test_vq_date
test_assignment_id()
@depends test_init_and_id
test_invalidate()
@depends test_vq_date
test_deadline()
@depends test_init_and_id
test_node_id()
@depends test_init_and_id
test_assignment_date()
@depends test_init_and_id
test_last_change_by()
@depends test_init_and_id
test_last_change_by_null()
@depends test_init_and_id
test_vq_date()
@depends test_init_and_id
test_last_change_by_invalid()
@depends test_init_and_id
test_user_id()
@depends test_init_and_id
test_completion_date()
@depends test_init_and_id
test_amount_of_points()
@depends test_init_and_id
test_status_invalid()
@depends test_init_and_id
test_status($status)
@dataProvider status
test_invalidate_non_expired_1()
@depends test_vq_date
test_completion_by()
@depends test_init_and_id
Class ilStudyProgrammeProgress.
const STATUS_NOT_RELEVANT