Test on Bar Configuration implementation.
More...
Test on Bar Configuration implementation.
Definition at line 30 of file AxisTest.php.
◆ testType()
Definition at line 46 of file AxisTest.php.
46 : void
47 {
48 $x_axis =
new XAxis();
49
50 $this->assertEquals("linear", $x_axis->getType());
51
52 $y_axis =
new YAxis();
53
54 $this->assertEquals("linear", $y_axis->getType());
55 }
◆ testWithBeginAtZero()
AxisTest::testWithBeginAtZero |
( |
| ) |
|
Definition at line 75 of file AxisTest.php.
75 : void
76 {
77 $x_axis =
new XAxis();
78 $x_axis1 = $x_axis->withBeginAtZero(false);
79
80 $this->assertEquals(true, $x_axis->isBeginAtZero());
81 $this->assertEquals(false, $x_axis1->isBeginAtZero());
82 }
◆ testWithDisplayed()
AxisTest::testWithDisplayed |
( |
| ) |
|
Definition at line 57 of file AxisTest.php.
57 : void
58 {
59 $x_axis =
new XAxis();
60 $x_axis1 = $x_axis->withDisplayed(false);
61
62 $this->assertEquals(true, $x_axis->isDisplayed());
63 $this->assertEquals(false, $x_axis1->isDisplayed());
64 }
◆ testWithMax()
AxisTest::testWithMax |
( |
| ) |
|
Definition at line 93 of file AxisTest.php.
93 : void
94 {
95 $x_axis =
new XAxis();
96 $x_axis1 = $x_axis->withMaxValue(10);
97
98 $this->assertEquals(null, $x_axis->getMaxValue());
99 $this->assertEquals(10, $x_axis1->getMaxValue());
100 }
◆ testWithMin()
AxisTest::testWithMin |
( |
| ) |
|
Definition at line 84 of file AxisTest.php.
84 : void
85 {
86 $x_axis =
new XAxis();
87 $x_axis1 = $x_axis->withMinValue(-2);
88
89 $this->assertEquals(null, $x_axis->getMinValue());
90 $this->assertEquals(-2, $x_axis1->getMinValue());
91 }
◆ testWithStepSize()
AxisTest::testWithStepSize |
( |
| ) |
|
Definition at line 66 of file AxisTest.php.
66 : void
67 {
68 $x_axis =
new XAxis();
69 $x_axis1 = $x_axis->withStepSize(0.5);
70
71 $this->assertEquals(1.0, $x_axis->getStepSize());
72 $this->assertEquals(0.5, $x_axis1->getStepSize());
73 }
◆ testXAbbreviation()
AxisTest::testXAbbreviation |
( |
| ) |
|
Definition at line 32 of file AxisTest.php.
32 : void
33 {
34 $x_axis =
new XAxis();
35
36 $this->assertEquals("x", $x_axis->getAbbreviation());
37 }
◆ testXWithInvalidPosition()
AxisTest::testXWithInvalidPosition |
( |
| ) |
|
Definition at line 111 of file AxisTest.php.
111 : void
112 {
113 $x_axis =
new XAxis();
114
115 $this->expectException(InvalidArgumentException::class);
116 $this->expectExceptionMessage("Position must be 'bottom' or 'top'.");
117
118 $x_axis = $x_axis->withPosition("left");
119 }
◆ testXWithPosition()
AxisTest::testXWithPosition |
( |
| ) |
|
Definition at line 102 of file AxisTest.php.
102 : void
103 {
104 $x_axis =
new XAxis();
105 $x_axis1 = $x_axis->withPosition("top");
106
107 $this->assertEquals("bottom", $x_axis->getPosition());
108 $this->assertEquals("top", $x_axis1->getPosition());
109 }
◆ testYAbbreviation()
AxisTest::testYAbbreviation |
( |
| ) |
|
Definition at line 39 of file AxisTest.php.
39 : void
40 {
41 $y_axis =
new YAxis();
42
43 $this->assertEquals("y", $y_axis->getAbbreviation());
44 }
◆ testYWithInvalidPosition()
AxisTest::testYWithInvalidPosition |
( |
| ) |
|
Definition at line 130 of file AxisTest.php.
130 : void
131 {
132 $y_axis =
new YAxis();
133
134 $this->expectException(InvalidArgumentException::class);
135 $this->expectExceptionMessage("Position must be 'left' or 'right'.");
136
137 $y_axis = $y_axis->withPosition("bottom");
138 }
◆ testYWithPosition()
AxisTest::testYWithPosition |
( |
| ) |
|
Definition at line 121 of file AxisTest.php.
121 : void
122 {
123 $y_axis =
new YAxis();
124 $y_axis1 = $y_axis->withPosition("right");
125
126 $this->assertEquals("left", $y_axis->getPosition());
127 $this->assertEquals("right", $y_axis1->getPosition());
128 }
The documentation for this class was generated from the following file: