ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
PHPUnit\Framework\Attributes\Test\Link\ExtLinkMapperTest Class Reference
+ Inheritance diagram for PHPUnit\Framework\Attributes\Test\Link\ExtLinkMapperTest:
+ Collaboration diagram for PHPUnit\Framework\Attributes\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()

PHPUnit\Framework\Attributes\Test\Link\ExtLinkMapperTest::testGetRefId ( )

Definition at line 29 of file ExtLinkMapperTest.php.

References $ref_id.

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,
48  $ref_id
49  );
50 
51  $ref_id = $ext_link_mapper->getRefId("http://localhost/ilias/goto_client_cat_581.html");
52  $this->assertEquals(
53  581,
54  $ref_id
55  );
56 
57  $ref_id = $ext_link_mapper->getRefId("http://localhost/ilias/go/file/33");
58  $this->assertEquals(
59  33,
60  $ref_id
61  );
62 
63  $ref_id = $ext_link_mapper->getRefId("http://localhost/ilias/ilias.php?baseClass=ilrepositorygui&ref_id=198");
64  $this->assertEquals(
65  198,
66  $ref_id
67  );
68  }
$ref_id
Definition: ltiauth.php:65

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