3 declare(strict_types=1);
21 require_once(__DIR__ .
"/../../../../../libs/composer/vendor/autoload.php");
22 require_once(__DIR__ .
"/../../../Base.php");
34 $x_axis =
new XAxis();
36 $this->assertEquals(
"x", $x_axis->getAbbreviation());
41 $y_axis =
new YAxis();
43 $this->assertEquals(
"y", $y_axis->getAbbreviation());
48 $x_axis =
new XAxis();
50 $this->assertEquals(
"linear", $x_axis->getType());
52 $y_axis =
new YAxis();
54 $this->assertEquals(
"linear", $y_axis->getType());
59 $x_axis =
new XAxis();
60 $x_axis1 = $x_axis->withDisplayed(
false);
62 $this->assertEquals(
true, $x_axis->isDisplayed());
63 $this->assertEquals(
false, $x_axis1->isDisplayed());
68 $x_axis =
new XAxis();
69 $x_axis1 = $x_axis->withStepSize(0.5);
71 $this->assertEquals(1.0, $x_axis->getStepSize());
72 $this->assertEquals(0.5, $x_axis1->getStepSize());
77 $x_axis =
new XAxis();
78 $x_axis1 = $x_axis->withBeginAtZero(
false);
80 $this->assertEquals(
true, $x_axis->isBeginAtZero());
81 $this->assertEquals(
false, $x_axis1->isBeginAtZero());
86 $x_axis =
new XAxis();
87 $x_axis1 = $x_axis->withMinValue(-2);
89 $this->assertEquals(null, $x_axis->getMinValue());
90 $this->assertEquals(-2, $x_axis1->getMinValue());
95 $x_axis =
new XAxis();
96 $x_axis1 = $x_axis->withMaxValue(10);
98 $this->assertEquals(null, $x_axis->getMaxValue());
99 $this->assertEquals(10, $x_axis1->getMaxValue());
104 $x_axis =
new XAxis();
105 $x_axis1 = $x_axis->withPosition(
"top");
107 $this->assertEquals(
"bottom", $x_axis->getPosition());
108 $this->assertEquals(
"top", $x_axis1->getPosition());
113 $x_axis =
new XAxis();
115 $this->expectException(InvalidArgumentException::class);
116 $this->expectExceptionMessage(
"Position must be 'bottom' or 'top'.");
118 $x_axis = $x_axis->withPosition(
"left");
123 $y_axis =
new YAxis();
124 $y_axis1 = $y_axis->withPosition(
"right");
126 $this->assertEquals(
"left", $y_axis->getPosition());
127 $this->assertEquals(
"right", $y_axis1->getPosition());
132 $y_axis =
new YAxis();
134 $this->expectException(InvalidArgumentException::class);
135 $this->expectExceptionMessage(
"Position must be 'left' or 'right'.");
137 $y_axis = $y_axis->withPosition(
"bottom");
Provides common functionality for UI tests.
test_with_begin_at_zero()
Test on Bar Configuration implementation.
test_y_with_invalid_position()
test_x_with_invalid_position()