ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
LSUrlBuilderTest.php
Go to the documentation of this file.
1<?php
2
3use PHPUnit\Framework\TestCase;
5
6class LSUrlBuilderTest extends TestCase
7{
8 public function setUp() : void
9 {
10 $data_factory = new Factory();
11 $uri = $data_factory->uri('http://ilias.de/somepath');
12 $this->ub = new LSUrlBuilder($uri);
13 }
14
15 public function testDataType()
16 {
17 $this->assertInstanceOf(ILIAS\Data\URI::class, $this->ub->getURL('x'));
18 }
19
20 public function testUrlConcatenation()
21 {
22 $uri = $this->ub->getURL('command', 123);
23 $expected = LSUrlBuilder::PARAM_LSO_COMMAND . '=command&'
25 $this->assertEquals($expected, $uri->getQuery());
26 }
27}
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:20
Class LSUrlBuilder.
const PARAM_LSO_COMMAND
const PARAM_LSO_PARAMETER
Class ChatMainBarProvider \MainMenu\Provider.