ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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 57 of file URIBuilderTest.php.

References null.

57  : \Iterator
58  {
59  yield ['wiki', 42, [], 'https://test9.ilias.de/goto.php/wiki/42'];
60  yield ['file', 42, ['download'], 'https://test9.ilias.de/goto.php/file/42/download'];
61  yield ['dashboard', null, [], 'https://test9.ilias.de/goto.php/dashboard'];
62  }
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  : \Iterator
36  {
37  yield ['https://ilias.de/ilias', 'https://ilias.de/ilias'];
38  yield ['https://ilias.de/ilias/', 'https://ilias.de/ilias'];
39  yield ['http://ilias.de/ilias', 'http://ilias.de/ilias'];
40  yield ['https://test9.ilias.de/goto.php', 'https://test9.ilias.de'];
41  yield ['https://test9.ilias.de/goto.php/', 'https://test9.ilias.de'];
42  yield ['https://test9.ilias.de/goto.php/wiki', 'https://test9.ilias.de'];
43  yield ['https://test9.ilias.de/goto.php/wiki/22', 'https://test9.ilias.de'];
44  yield ['http://test9.ilias.de/goto.php', 'http://test9.ilias.de'];
45  yield ['http://test9.ilias.de/go/hello', 'http://test9.ilias.de'];
46  yield ['http://test9.ilias.de/go/hello', 'http://test9.ilias.de'];
47  yield ['http://test9.ilias.de/Customizing/plugins/Services/index.php', 'http://test9.ilias.de'];
48  }

◆ testBaseURI()

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

Definition at line 51 of file URIBuilderTest.php.

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

51  : void
52  {
53  $uri_builder = new StandardURIBuilder($ILIAS_HTTP_PATH);
54  $this->assertSame($expected, (string) $uri_builder->getBaseURI());
55  }
+ 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 65 of file URIBuilderTest.php.

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

65  : void
66  {
67  $uri_builder = new StandardURIBuilder('https://test9.ilias.de');
68  $uri = $uri_builder->build(
69  $namespace,
70  $ref_id === null ? null : new ReferenceId($ref_id),
71  $params
72  );
73  $this->assertSame($expected, (string) $uri);
74  }
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: