3 declare(strict_types=1);
22 require_once(
'./libs/composer/vendor/autoload.php');
29 protected Dimension\Factory
$f;
31 protected function setUp(): void
33 $this->f =
new Dimension\Factory();
38 $labels = [
"label1",
"label2",
"label3"];
39 $c = $this->f->cardinal($labels);
40 $this->assertEquals($labels,
$c->getLabels());
45 $labels = [
"label1",
"label2",
"label3"];
46 $c = $this->f->cardinal($labels);
47 $r = $this->f->range(
$c);
48 $this->assertEquals($labels,
$r->getLabels());
49 $this->assertEquals(
$c->getLabels(),
$r->getLabels());
55 $c = $this->f->cardinal();
59 $c->checkValue(
"1.5");
60 $this->assertTrue(
true);
62 $this->assertFalse(
"This should not happen.");
69 $c = $this->f->cardinal();
71 $this->assertTrue(
true);
73 $this->assertFalse(
"This should not happen.");
80 $c = $this->f->cardinal();
81 $c->checkValue(
"A value");
82 $this->assertFalse(
"This should not happen.");
84 $this->assertTrue(
true);
91 $c = $this->f->cardinal();
92 $r = $this->f->range(
$c);
94 $this->assertTrue(
true);
96 $this->assertFalse(
"This should not happen.");
103 $c = $this->f->cardinal();
104 $r = $this->f->range(
$c);
105 $r->checkValue([-2, 0]);
106 $r->checkValue([0.5,
"1.5"]);
107 $this->assertTrue(
true);
109 $this->assertFalse(
"This should not happen.");
116 $c = $this->f->cardinal();
117 $r = $this->f->range(
$c);
119 $this->assertFalse(
"This should not happen.");
121 $this->assertTrue(
true);
128 $c = $this->f->cardinal();
129 $r = $this->f->range(
$c);
131 $this->assertFalse(
"This should not happen.");
133 $this->assertTrue(
true);
140 $c = $this->f->cardinal();
141 $r = $this->f->range(
$c);
142 $r->checkValue([2,
"A value"]);
143 $this->assertFalse(
"This should not happen.");
145 $this->assertTrue(
true);
testCardinalNumericValues()
testCardinalInvalidValue()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...