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