ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\StaticURL\Tests\URIBuilderTest Class Reference
+ Inheritance diagram for ILIAS\StaticURL\Tests\URIBuilderTest:
+ Collaboration diagram for ILIAS\StaticURL\Tests\URIBuilderTest:

Public Member Functions

 getILIAS_HTTP_Paths ()
 
 testBaseURI (string $ILIAS_HTTP_PATH, string $expected)
 getILIAS_HTTP_Paths More...
 
 getBuilderParts ()
 
 testFullBuilder (string $namespace, ?int $ref_id, array $params, string $expected)
 getBuilderParts More...
 

Private Attributes

string $ilias_http_path_backup = null
 
StandardURIBuilder $uri_builder
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 29 of file URIBuilderTest.php.

Member Function Documentation

◆ getBuilderParts()

ILIAS\StaticURL\Tests\URIBuilderTest::getBuilderParts ( )

Definition at line 60 of file URIBuilderTest.php.

60  : array
61  {
62  return [
63  ['wiki', 42, [], 'https://test9.ilias.de/goto.php/wiki/42'],
64  ['file', 42, ['download'], 'https://test9.ilias.de/goto.php/file/42/download'],
65  ['dashboard', null, [], 'https://test9.ilias.de/goto.php/dashboard'],
66 
67  ];
68  }

◆ getILIAS_HTTP_Paths()

ILIAS\StaticURL\Tests\URIBuilderTest::getILIAS_HTTP_Paths ( )

Definition at line 34 of file URIBuilderTest.php.

34  : array
35  {
36  return [
37  ['https://ilias.de/ilias', 'https://ilias.de/ilias'],
38  ['https://ilias.de/ilias/', 'https://ilias.de/ilias'],
39  ['http://ilias.de/ilias', 'http://ilias.de/ilias'],
40  ['https://test9.ilias.de/goto.php', 'https://test9.ilias.de'],
41  ['https://test9.ilias.de/goto.php/', 'https://test9.ilias.de'],
42  ['https://test9.ilias.de/goto.php/wiki', 'https://test9.ilias.de'],
43  ['https://test9.ilias.de/goto.php/wiki/22', 'https://test9.ilias.de'],
44  ['http://test9.ilias.de/goto.php', 'http://test9.ilias.de'],
45  ['http://test9.ilias.de/go/hello', 'http://test9.ilias.de'],
46  ['http://test9.ilias.de/go/hello', 'http://test9.ilias.de'],
47  ['http://test9.ilias.de/Customizing/global/plugins/Services/index.php', 'http://test9.ilias.de'],
48  ];
49  }

◆ testBaseURI()

ILIAS\StaticURL\Tests\URIBuilderTest::testBaseURI ( string  $ILIAS_HTTP_PATH,
string  $expected 
)

getILIAS_HTTP_Paths

Definition at line 54 of file URIBuilderTest.php.

References ILIAS\StaticURL\Builder\StandardURIBuilder\getBaseURI().

54  : void
55  {
56  $uri_builder = new StandardURIBuilder($ILIAS_HTTP_PATH);
57  $this->assertEquals($expected, (string) $uri_builder->getBaseURI());
58  }
+ Here is the call graph for this function:

◆ testFullBuilder()

ILIAS\StaticURL\Tests\URIBuilderTest::testFullBuilder ( string  $namespace,
?int  $ref_id,
array  $params,
string  $expected 
)

getBuilderParts

Definition at line 73 of file URIBuilderTest.php.

References ILIAS\StaticURL\Builder\StandardURIBuilder\build().

73  : void
74  {
75  $uri_builder = new StandardURIBuilder('https://test9.ilias.de');
76  $uri = $uri_builder->build(
77  $namespace,
78  $ref_id === null ? null : new ReferenceId($ref_id),
79  $params
80  );
81  $this->assertEquals($expected, (string) $uri);
82  }
if($err=$client->getError()) $namespace
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
$ref_id
Definition: ltiauth.php:67
build(string $namespace, ?ReferenceId $reference_id=null, array $additional_parameters=[])
+ Here is the call graph for this function:

Field Documentation

◆ $ilias_http_path_backup

string ILIAS\StaticURL\Tests\URIBuilderTest::$ilias_http_path_backup = null
private

Definition at line 31 of file URIBuilderTest.php.

◆ $uri_builder

StandardURIBuilder ILIAS\StaticURL\Tests\URIBuilderTest::$uri_builder
private

Definition at line 32 of file URIBuilderTest.php.


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