ILIAS  release_8 Revision v8.24
BarConfigTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21require_once(__DIR__ . "/../../../../../libs/composer/vendor/autoload.php");
22require_once(__DIR__ . "/../../../Base.php");
23
25
30{
31 public function test_with_color(): void
32 {
33 $df = $this->getDataFactory();
34
35 $bc = new BarConfig();
36 $color = $df->color("#000000");
37 $bc1 = $bc->withColor($color);
38
39 $this->assertEquals(null, $bc->getColor());
40 $this->assertEquals($color, $bc1->getColor());
41 }
42
43 public function test_with_width(): void
44 {
45 $df = $this->getDataFactory();
46
47 $bc = new BarConfig();
48 $width = 0.5;
49 $bc1 = $bc->withRelativeWidth($width);
50
51 $this->assertEquals(null, $bc->getRelativeWidth());
52 $this->assertEquals($width, $bc1->getRelativeWidth());
53 }
54}
Test on Bar Configuration implementation.
Provides common functionality for UI tests.
Definition: Base.php:299