ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilStudyProgrammeAutoMembershipsSourceTest.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 string $source_type;
27  protected int $source_id;
28  protected bool $enbl;
29  protected int $usr_id;
31 
32  protected function setUp(): void
33  {
34  $this->prg_obj_id = 123;
36  $this->source_id = 666;
37  $this->enbl = true;
38  $this->usr_id = 6;
39  $this->dat = new DateTimeImmutable('2019-06-05 15:25:12');
40  }
41 
43  {
45  $this->prg_obj_id,
46  $this->source_type,
47  $this->source_id,
48  $this->enbl,
49  $this->usr_id,
50  $this->dat,
51  false
52  );
53  $this->assertInstanceOf(
54  ilStudyProgrammeAutoMembershipSource::class,
55  $ams
56  );
57  return $ams;
58  }
59 
60  #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
62  {
63  $this->assertEquals(
64  $this->prg_obj_id,
65  $ams->getPrgObjId()
66  );
67  }
68 
69  #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
71  {
72  $this->assertEquals(
73  $this->source_type,
74  $ams->getSourceType()
75  );
76  }
77  #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
79  {
80  $this->assertEquals(
81  $this->source_id,
82  $ams->getSourceId()
83  );
84  }
85 
86  #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
88  {
89  $this->assertEquals(
90  $this->usr_id,
91  $ams->getLastEditorId()
92  );
93  }
94 
95  #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
97  {
98  $this->assertEquals(
99  $this->dat,
100  $ams->getLastEdited()
101  );
102  }
103 }
testGetSourceId(ilStudyProgrammeAutoMembershipSource $ams)
testGetLastEditorId(ilStudyProgrammeAutoMembershipSource $ams)
testGetLastEdited(ilStudyProgrammeAutoMembershipSource $ams)
testGetPrgObjId(ilStudyProgrammeAutoMembershipSource $ams)
testGetSourceType(ilStudyProgrammeAutoMembershipSource $ams)