ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\COPage\Test\Link\ExtLinkMapperTest Class Reference
+ Inheritance diagram for ILIAS\COPage\Test\Link\ExtLinkMapperTest:
+ Collaboration diagram for ILIAS\COPage\Test\Link\ExtLinkMapperTest:

Public Member Functions

 testGetRefId ()
 

Additional Inherited Members

- Protected Member Functions inherited from COPageTestBase
 setGlobalVariable (string $name, $value)
 
 setUp ()
 
 getIdGeneratorMock ()
 
 getPCDefinition ()
 
 setPCIdCnt (int $cnt)
 
 getIDManager (\ilPageObject $page)
 
 insertParagraphAt (\ilPageObject $page, string $hier_id, string $text="")
 
 tearDown ()
 
 normalize (string $html)
 
 assertXmlEquals (string $expected_xml_as_string, string $html_xml_string)
 
 getEmptyPageWithDom ()
 
 legacyHtmlToXml (string $content)
 
 getMediaObjectMock ()
 
- Protected Attributes inherited from COPageTestBase
int $pc_cnt
 

Detailed Description

Definition at line 27 of file ExtLinkMapperTest.php.

Member Function Documentation

◆ testGetRefId()

ILIAS\COPage\Test\Link\ExtLinkMapperTest::testGetRefId ( )

Definition at line 29 of file ExtLinkMapperTest.php.

29 : void
30 {
31 $def_mock = $this->getMockBuilder(\ilObjectDefinition::class)
32 ->disableOriginalConstructor()
33 ->getMock();
34 $def_mock
35 ->method('isRBACObject')
36 ->willReturn(true);
37
38 $ext_link_mapper = new ExtLinkMapper(
39 $def_mock,
40 "http://localhost/ilias",
41 [3 => 5],
42 "client"
43 );
44
45 $ref_id = $ext_link_mapper->getRefId("http://localhost/ilias/goto.php/file/231");
46 $this->assertEquals(
47 231,
49 );
50
51 $ref_id = $ext_link_mapper->getRefId("http://localhost/ilias/goto_client_cat_581.html");
52 $this->assertEquals(
53 581,
55 );
56
57 $ref_id = $ext_link_mapper->getRefId("http://localhost/ilias/go/file/33");
58 $this->assertEquals(
59 33,
61 );
62
63 $ref_id = $ext_link_mapper->getRefId("http://localhost/ilias/ilias.php?baseClass=ilrepositorygui&ref_id=198");
64 $this->assertEquals(
65 198,
67 );
68 }
$ref_id
Definition: ltiauth.php:66

References $ref_id.


The documentation for this class was generated from the following file: