ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
BarConfigTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21require_once(__DIR__ . "/../../../../../../../vendor/composer/vendor/autoload.php");
22require_once(__DIR__ . "/../../../Base.php");
23
25
30{
31 public function getDataFactory(): ILIAS\Data\Factory
32 {
33 return new ILIAS\Data\Factory();
34 }
35
36 public function testWithColor(): void
37 {
38 $df = $this->getDataFactory();
39
40 $bc = new BarConfig();
41 $color = $df->color("#000000");
42 $bc1 = $bc->withColor($color);
43
44 $this->assertEquals(null, $bc->getColor());
45 $this->assertEquals($color, $bc1->getColor());
46 }
47
48 public function testWithWidth(): void
49 {
50 $bc = new BarConfig();
51 $width = 0.5;
52 $bc1 = $bc->withRelativeWidth($width);
53
54 $this->assertEquals(null, $bc->getRelativeWidth());
55 $this->assertEquals($width, $bc1->getRelativeWidth());
56 }
57}
Test on Bar Configuration implementation.
Builds data types.
Definition: Factory.php:36
Provides common functionality for UI tests.
Definition: Base.php:337
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.