Skip to content

Commit 62eee7e

Browse files
committed
test(Toolbox): tighten code coverage
1 parent bbaa32e commit 62eee7e

File tree

1 file changed

+1
-46
lines changed

1 file changed

+1
-46
lines changed

tests/units/ToolboxTest.php

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,11 @@
4545
use Infocom;
4646
use Location;
4747
use PHPUnit\Framework\Attributes\CoversClass;
48+
use PHPUnit\Framework\Attributes\CoversMethod;
4849

4950
#[CoversClass(Toolbox::class)]
5051
class ToolboxTest extends DbTestCase
5152
{
52-
/**
53-
* #CoversMethod GlpiPlugin\Carbon\Toolbox::getOldestAssetDate
54-
*
55-
* @return void
56-
*/
5753
public function testGetOldestAssetDate()
5854
{
5955
$toolbox = new Toolbox();
@@ -92,11 +88,6 @@ public function testGetOldestAssetDate()
9288
$this->assertEquals($expected, $output);
9389
}
9490

95-
/**
96-
* #CoversMethod GlpiPlugin\Carbon\Toolbox::getLatestAssetDate
97-
*
98-
* @return void
99-
*/
10091
public function testGetLatestAssetDate()
10192
{
10293
$toolbox = new Toolbox();
@@ -120,11 +111,6 @@ public function testGetLatestAssetDate()
120111
$this->assertEquals($expected, $output);
121112
}
122113

123-
/**
124-
* #CoversMethod GlpiPlugin\Carbon\Toolbox::getDefaultCarbonIntensityDownloadDate
125-
*
126-
* @return void
127-
*/
128114
public function testGetDefaultCarbonIntensityDownloadDate()
129115
{
130116
$instance = new Toolbox();
@@ -136,11 +122,6 @@ public function testGetDefaultCarbonIntensityDownloadDate()
136122
$this->assertEquals($expected, $output);
137123
}
138124

139-
/**
140-
* #CoversMethod GlpiPlugin\Carbon\Toolbox::yearToLastMonth
141-
*
142-
* @return void
143-
*/
144125
public function testYearToLastMonth()
145126
{
146127
$end = new DateTimeImmutable('2023-04-09 13:45:17');
@@ -162,11 +143,6 @@ public function testYearToLastMonth()
162143
$this->assertEquals($expected, $output);
163144
}
164145

165-
/**
166-
* #CoversMethod GlpiPlugin\Carbon\Toolbox::isLocationExistForZone
167-
*
168-
* @return void
169-
*/
170146
public function testIsLocationExistsForZone()
171147
{
172148
$output = Toolbox::isLocationExistForZone('foo');
@@ -182,11 +158,6 @@ public function testIsLocationExistsForZone()
182158
$this->assertTrue($output);
183159
}
184160

185-
/**
186-
* #CoversMethod GlpiPlugin\Carbon\Toolbox::getGwpUsageImpactClasses
187-
*
188-
* @return void
189-
*/
190161
public function testGetGwpUsageImpactClasses()
191162
{
192163
$output = Toolbox::getGwpUsageImpactClasses();
@@ -198,11 +169,6 @@ public function testGetGwpUsageImpactClasses()
198169
], $output);
199170
}
200171

201-
/**
202-
* #CoversMethod GlpiPlugin\Carbon\Toolbox::getUsageImpactClasses
203-
*
204-
* @return void
205-
*/
206172
public function testGetUsageImpactClasses()
207173
{
208174
$output = Toolbox::getUsageImpactClasses();
@@ -214,11 +180,6 @@ public function testGetUsageImpactClasses()
214180
], $output);
215181
}
216182

217-
/**
218-
* #CoversMethod GlpiPlugin\Carbon\Toolbox::getEmbodiedImpactClasses
219-
*
220-
* @return void
221-
*/
222183
public function testGetEmbodiedImpactClasses()
223184
{
224185
$output = Toolbox::getEmbodiedImpactClasses();
@@ -262,12 +223,6 @@ public function testDateIntervalToMySQLInterval()
262223
$this->assertEquals('INTERVAL 3 YEAR + INTERVAL 40 MINUTE', $result);
263224
}
264225

265-
266-
/**
267-
* Undocumented function
268-
*
269-
* @return void
270-
*/
271226
public function testFindTemporalGapsInTable()
272227
{
273228
$table = getTableForItemType(CarbonIntensity::class);

0 commit comments

Comments
 (0)