ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilStudyProgrammeAutoMembershipsSourceTest.php
Go to the documentation of this file.
1 <?php
2 
3 class ilStudyProgrammeAutoMembershipsSourceTest 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;
12  $this->source_id = 666;
13  $this->enbl = true;
14  $this->usr_id = 6;
15  $this->dat = new DateTimeImmutable('2019-06-05 15:25:12');
16  }
17 
18  public function testConstruction()
19  {
21  $this->prg_obj_id,
22  $this->source_type,
23  $this->source_id,
24  $this->enbl,
25  $this->usr_id,
26  $this->dat
27  );
28  $this->assertInstanceOf(
29  ilStudyProgrammeAutoMembershipSource::class,
30  $ams
31  );
32  return $ams;
33  }
34 
38  public function testGetPrgObjId($ams)
39  {
40  $this->assertEquals(
41  $this->prg_obj_id,
42  $ams->getPrgObjId()
43  );
44  }
45 
49  public function testGetSourceType($ams)
50  {
51  $this->assertEquals(
52  $this->source_type,
53  $ams->getSourceType()
54  );
55  }
59  public function testGetSourceId($ams)
60  {
61  $this->assertEquals(
62  $this->source_id,
63  $ams->getSourceId()
64  );
65  }
66 
70  public function testGetLastEditorId($ams)
71  {
72  $this->assertEquals(
73  $this->usr_id,
74  $ams->getLastEditorId()
75  );
76  }
77 
81  public function testGetLastEdited($ams)
82  {
83  $this->assertEquals(
84  $this->dat,
85  $ams->getLastEdited()
86  );
87  }
88 }