@@ -17,26 +17,22 @@ protected function setUp(): void
17
17
}
18
18
19
19
/**
20
- * @test
21
- *
22
20
* Test if the chart instance can be created successfully.
23
21
*
24
22
* We assert that the created instance is an instance of the Chart class.
25
23
*/
26
- public function can_create_it ()
24
+ public function test_can_create_it ()
27
25
{
28
26
$ this ->assertInstanceOf (Chart::class, $ this ->chart );
29
27
}
30
28
31
29
/**
32
- * @test
33
- *
34
30
* Test if the chart is responsive.
35
31
*
36
32
* We set the chart type to 'line' and assert that the chart options
37
33
* include the 'responsive' property set to true.
38
34
*/
39
- public function it_is_responsive ()
35
+ public function test_it_is_responsive ()
40
36
{
41
37
$ expected = [
42
38
'type ' => 'line ' ,
@@ -55,15 +51,13 @@ public function it_is_responsive()
55
51
}
56
52
57
53
/**
58
- * @test
59
- *
60
54
* Test if the chart is animated.
61
55
*
62
56
* We set the chart type to 'line' and assert that the chart
63
57
* options include the 'responsive' property set to true and the
64
58
* 'responsiveAnimationDuration' property set to 10.
65
59
*/
66
- public function it_is_animated ()
60
+ public function test_it_is_animated ()
67
61
{
68
62
$ expected = [
69
63
'type ' => 'line ' ,
@@ -86,15 +80,13 @@ public function it_is_animated()
86
80
}
87
81
88
82
/**
89
- * @test
90
- *
91
83
* Test if the chart has basic datasets in JSON format.
92
84
*
93
85
* We create a Data object with two datasets, each containing an array of data values.
94
86
* We set the chart data to the created Data object and assert that the
95
87
* chart data is encoded to the expected JSON format.
96
88
*/
97
- public function it_has_basic_datasets_json ()
89
+ public function test_it_has_basic_datasets_json ()
98
90
{
99
91
$ data = new Data ([
100
92
'datasets ' => [
@@ -128,8 +120,6 @@ public function it_has_basic_datasets_json()
128
120
}
129
121
130
122
/**
131
- * @test
132
- *
133
123
* Test if the chart has basic data with labels.
134
124
*
135
125
* We create a Data object and two Dataset objects.
@@ -138,7 +128,7 @@ public function it_has_basic_datasets_json()
138
128
* We assert that the chart data includes the datasets, labels, and
139
129
* other properties in the expected format.
140
130
*/
141
- public function it_has_basic_data_with_labels ()
131
+ public function test_it_has_basic_data_with_labels ()
142
132
{
143
133
$ data = new Data ;
144
134
@@ -171,8 +161,6 @@ public function it_has_basic_data_with_labels()
171
161
}
172
162
173
163
/**
174
- * @test
175
- *
176
164
* Test if the chart has basic data with labels and colors.
177
165
*
178
166
* We create a Data object and two Dataset objects.
@@ -181,7 +169,7 @@ public function it_has_basic_data_with_labels()
181
169
* We assert that the chart data includes the datasets, labels,
182
170
* background colors, and other properties in the expected format.
183
171
*/
184
- public function it_has_basic_data_with_labels_and_colors ()
172
+ public function test_it_has_basic_data_with_labels_and_colors ()
185
173
{
186
174
$ data = new Data ;
187
175
@@ -216,8 +204,6 @@ public function it_has_basic_data_with_labels_and_colors()
216
204
}
217
205
218
206
/**
219
- * @test
220
- *
221
207
* Test if the chart can be configured to start from zero using a helper method.
222
208
*
223
209
* We create a Data object and a Dataset object.
@@ -229,7 +215,7 @@ public function it_has_basic_data_with_labels_and_colors()
229
215
* background colors, and other properties in the expected format,
230
216
* including the 'beginAtZero' configuration for the y-axis ticks.
231
217
*/
232
- public function can_set_start_from_zero_using_helper ()
218
+ public function test_can_set_start_from_zero_using_helper ()
233
219
{
234
220
$ data = new Data ;
235
221
@@ -271,8 +257,6 @@ public function can_set_start_from_zero_using_helper()
271
257
}
272
258
273
259
/**
274
- * @test
275
- *
276
260
* Test if the chart can create mixed chart types.
277
261
*
278
262
* We set the chart type to 'bar' and create a Data object.
@@ -282,7 +266,7 @@ public function can_set_start_from_zero_using_helper()
282
266
* We assert that the chart data includes the datasets, labels, chart type,
283
267
* and other properties in the expected format.
284
268
*/
285
- public function can_create_mixed_chart_types ()
269
+ public function test_can_create_mixed_chart_types ()
286
270
{
287
271
$ this ->chart ->type = 'bar ' ;
288
272
0 commit comments