ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjChatroomAdminTest.php
Go to the documentation of this file.
1 <?php
2 
8 {
9  protected function setUp()
10  {
11  if (defined('ILIAS_PHPUNIT_CONTEXT')) {
12  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
13  ilUnitUtil::performInitialisation();
14  } else {
15  chdir(dirname(__FILE__));
16  chdir('../../../');
17  }
18 
19  require_once './Services/Utilities/classes/class.ilBenchmark.php';
20  $ilBenchMock = $this->createMock('ilBenchmark');
21  $ilBenchMock->expects($this->any())->method('start');
22  $ilBenchMock->expects($this->any())->method('stop');
23  global $ilBench;
24  $ilBench = $ilBenchMock;
25 
26  require_once './Modules/Chatroom/classes/class.ilObjChatroomAdmin.php';
27  }
28 
29  public function testConstructor()
30  {
31  define('DEBUG', false);
32  $admin = new ilObjChatroomAdmin();
33 
34  $this->assertInstanceOf('ilObjChatroomAdmin', $admin);
35  $this->assertEquals(0, $admin->getId());
36  $this->assertEquals('chta', $admin->getType());
37  }
38 }
Class ilObjChatroomAdmin.
Class ilObjChatroomAdminTest.
global $ilBench
Definition: ilias.php:18