ILIAS  release_8 Revision v8.24
ilRandomTestDataTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
26{
28
29 protected function setUp(): void
30 {
31 parent::setUp();
32
33 $this->testObj = new ilRandomTestData("150", "testString");
34 }
35
37 {
38 $this->assertInstanceOf(ilRandomTestData::class, $this->testObj);
39 }
40
41 public function test__get(): void
42 {
44 $this->assertEquals(0, $testObj->__get("count"));
45 $this->assertEquals("", $testObj->__get("qpl"));
46
47 $this->assertEquals(150, $this->testObj->__get("count"));
48 $this->assertEquals("testString", $this->testObj->__get("qpl"));
49
50 $this->assertNull($testObj->__get("abcd"));
51 }
52
53 public function test__set(): void
54 {
55 $this->testObj->__set("count", 1125);
56 $this->assertEquals(1125, $this->testObj->__get("count"));
57
58 $this->testObj->__set("qpl", "ttt");
59 $this->assertEquals("ttt", $this->testObj->__get("qpl"));
60 }
61}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilTestBaseClass.