Definition at line 28 of file ReadableTest.php.
◆ testConstruct()
ILIAS\Test\Access\test\ReadableTest::testConstruct |
( |
| ) |
|
Definition at line 30 of file ReadableTest.php.
30 : void
31 {
32 $access = $this->getMockBuilder(ilAccessHandler::class)->disableOriginalConstructor()->getMock();
33
34 $this->assertInstanceOf(Readable::class, new Readable($access));
35 }
◆ testObjectId()
ILIAS\Test\Access\test\ReadableTest::testObjectId |
( |
| ) |
|
Definition at line 45 of file ReadableTest.php.
45 : void
46 {
47 $access = $this->getMockBuilder(ilAccessHandler::class)->disableOriginalConstructor()->getMock();
48
49 $access->method('checkAccess')->with('read', '', 456)->willReturn(true);
50
51 $references_of = fn(int $object_id) => 123 !== $object_id ?: [456];
52
53 $this->assertTrue((new Readable($access, $references_of))->objectId(123));
54 }
◆ testReferences()
ILIAS\Test\Access\test\ReadableTest::testReferences |
( |
| ) |
|
Definition at line 37 of file ReadableTest.php.
37 : void
38 {
39 $access = $this->getMockBuilder(ilAccessHandler::class)->disableOriginalConstructor()->getMock();
40 $access->method('checkAccess')->with('read', '', 123)->willReturn(true);
41
42 $this->assertTrue((new Readable($access))->references([123]));
43 }
The documentation for this class was generated from the following file: