ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilStudyProgrammeAutoCategoryTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 {
25  protected int $prg_obj_id;
26  protected int $cat_ref_id;
27  protected int $usr_id;
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 
39  {
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')]
64  {
65  $this->assertEquals(
66  $this->cat_ref_id,
67  $ac->getCategoryRefId()
68  );
69  }
70 
71  #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
73  {
74  $this->assertEquals(
75  $this->usr_id,
76  $ac->getLastEditorId()
77  );
78  }
79 
80  #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
82  {
83  $this->assertEquals(
84  $this->dat,
85  $ac->getLastEdited()
86  );
87  }
88 }
testGetCategoryRefId(ilStudyProgrammeAutoCategory $ac)
testGetLastEdited(ilStudyProgrammeAutoCategory $ac)
testGetPrgObjId(ilStudyProgrammeAutoCategory $ac)
testGetLastEditorId(ilStudyProgrammeAutoCategory $ac)
Class ilStudyProgrammeAutoCategory.