ILIAS  release_7 Revision v7.30-3-g800a261c036
ilStudyProgrammeAutoCategoryTest.php
Go to the documentation of this file.
1<?php
2
3class ilStudyProgrammeAutoCategoryTest extends \PHPUnit\Framework\TestCase
4{
5 protected $backupGlobals = false;
6
7 public function setUp() : void
8 {
9 PHPUnit_Framework_Error_Deprecated::$enabled = false;
10 $this->prg_obj_id = 123;
11 $this->cat_ref_id = 666;
12 $this->usr_id = 6;
13 $this->dat = new DateTimeImmutable('2019-06-05 15:25:12');
14 }
15
16 public function testConstruction()
17 {
19 $this->prg_obj_id,
20 $this->cat_ref_id,
21 $this->usr_id,
22 $this->dat
23 );
24 $this->assertInstanceOf(
25 ilStudyProgrammeAutoCategory::class,
26 $ac
27 );
28 return $ac;
29 }
30
34 public function testGetPrgObjId($ac)
35 {
36 $this->assertEquals(
37 $this->prg_obj_id,
38 $ac->getPrgObjId()
39 );
40 }
41
45 public function testGetCategoryRefId($ac)
46 {
47 $this->assertEquals(
48 $this->cat_ref_id,
49 $ac->getCategoryRefId()
50 );
51 }
52
56 public function testGetLastEditorId($ac)
57 {
58 $this->assertEquals(
59 $this->usr_id,
60 $ac->getLastEditorId()
61 );
62 }
63
67 public function testGetLastEdited($ac)
68 {
69 $this->assertEquals(
70 $this->dat,
71 $ac->getLastEdited()
72 );
73 }
74}
An exception for terminatinating execution or to throw for unit testing.
testGetLastEditorId($ac)
@depends testConstruction
testGetCategoryRefId($ac)
@depends testConstruction
Class ilStudyProgrammeAutoCategory.