ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\StaticURL\Tests\URIBuilderTest Class Reference
+ Inheritance diagram for ILIAS\StaticURL\Tests\URIBuilderTest:
+ Collaboration diagram for ILIAS\StaticURL\Tests\URIBuilderTest:

Public Member Functions

 testBaseURI (string $ILIAS_HTTP_PATH, string $expected)
 
 testFullBuilder (string $namespace, ?int $ref_id, array $params, string $expected)
 

Static Public Member Functions

static getILIAS_HTTP_Paths ()
 
static getBuilderParts ()
 

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 30 of file URIBuilderTest.php.

Member Function Documentation

◆ getBuilderParts()

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

Definition at line 59 of file URIBuilderTest.php.

References null.

59  : array
60  {
61  return [
62  ['wiki', 42, [], 'https://test9.ilias.de/goto.php/wiki/42'],
63  ['file', 42, ['download'], 'https://test9.ilias.de/goto.php/file/42/download'],
64  ['dashboard', null, [], 'https://test9.ilias.de/goto.php/dashboard'],
65 
66  ];
67  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ getILIAS_HTTP_Paths()

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

Definition at line 35 of file URIBuilderTest.php.

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

◆ testBaseURI()

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

Definition at line 53 of file URIBuilderTest.php.

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

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

◆ testFullBuilder()

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

Definition at line 70 of file URIBuilderTest.php.

References ILIAS\StaticURL\Builder\StandardURIBuilder\build(), and null.

70  : void
71  {
72  $uri_builder = new StandardURIBuilder('https://test9.ilias.de');
73  $uri = $uri_builder->build(
74  $namespace,
75  $ref_id === null ? null : new ReferenceId($ref_id),
76  $params
77  );
78  $this->assertEquals($expected, (string) $uri);
79  }
if($err=$client->getError()) $namespace
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$ref_id
Definition: ltiauth.php:65
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 32 of file URIBuilderTest.php.

◆ $uri_builder

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

Definition at line 33 of file URIBuilderTest.php.


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