ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
LSUrlBuilderTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
23
24class LSUrlBuilderTest extends TestCase
25{
26 protected LSUrlBuilder $ub;
27
28 protected function setUp(): void
29 {
30 $data_factory = new Factory();
31 $uri = $data_factory->uri('https://ilias.de/somepath');
32 $this->ub = new LSUrlBuilder($uri);
33 }
34
35 public function testDataType(): void
36 {
37 $this->assertInstanceOf(ILIAS\Data\URI::class, $this->ub->getURL('x'));
38 }
39
40 public function testUrlConcatenation(): void
41 {
42 $uri = $this->ub->getURL('command', 123);
43 $expected = LSUrlBuilder::PARAM_LSO_COMMAND . '=command&'
45 $this->assertEquals($expected, $uri->getQuery());
46 }
47}
Builds data types.
Definition: Factory.php:36
const PARAM_LSO_COMMAND
const PARAM_LSO_PARAMETER
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.