diff --git a/test/BranchCoverageTest.php b/test/BranchCoverageTest.php index ca45ed0..581c2a4 100644 --- a/test/BranchCoverageTest.php +++ b/test/BranchCoverageTest.php @@ -10,8 +10,7 @@ #[TestDox("BranchCoverage")] final class BranchCoverageTest extends TestCase { - #[Test] - #[TestDox("fromJson()")] + #[Test, TestDox("fromJson()")] function fromJson(): void { // It should return an instance with default values for an empty map. $coverage = BranchCoverage::fromJson(new \stdClass); @@ -30,8 +29,7 @@ function fromJson(): void { assertThat($data->lineNumber, equalTo(127)); } - #[Test] - #[TestDox("__toString()")] + #[Test, TestDox("__toString()")] function testToString(): void { // It should return a format like 'BRF:\\nBRH:'. assertThat((string) new BranchCoverage, equalTo(strtr("BRF:0{eol}BRH:0", ["{eol}" => PHP_EOL]))); diff --git a/test/BranchDataTest.php b/test/BranchDataTest.php index 3b8e18e..d74f38f 100644 --- a/test/BranchDataTest.php +++ b/test/BranchDataTest.php @@ -10,8 +10,7 @@ #[TestDox("BranchData")] final class BranchDataTest extends TestCase { - #[Test] - #[TestDox("fromJson()")] + #[Test, TestDox("fromJson()")] function fromJson(): void { // It should return an instance with default values for an empty map. $data = BranchData::fromJson(new \stdClass); @@ -28,8 +27,7 @@ function fromJson(): void { assertThat($data->taken, equalTo(1)); } - #[Test] - #[TestDox("__toString()")] + #[Test, TestDox("__toString()")] function testToString(): void { // It should return a format like 'BRDA:,,,'. assertThat((string) new BranchData, equalTo("BRDA:0,0,0,-")); diff --git a/test/FunctionCoverageTest.php b/test/FunctionCoverageTest.php index 5396911..e763466 100644 --- a/test/FunctionCoverageTest.php +++ b/test/FunctionCoverageTest.php @@ -10,8 +10,7 @@ #[TestDox("FunctionCoverage")] final class FunctionCoverageTest extends TestCase { - #[Test] - #[TestDox("fromJson()")] + #[Test, TestDox("fromJson()")] function fromJson(): void { // It should return an instance with default values for an empty map. $coverage = FunctionCoverage::fromJson(new \stdClass); @@ -30,8 +29,7 @@ function fromJson(): void { assertThat($data->lineNumber, equalTo(127)); } - #[Test] - #[TestDox("__toString()")] + #[Test, TestDox("__toString()")] function testToString(): void { // It should return a format like 'FNF:\\nFNH:'. assertThat((string) new FunctionCoverage, equalTo(strtr("FNF:0{eol}FNH:0", ["{eol}" => PHP_EOL]))); diff --git a/test/FunctionDataTest.php b/test/FunctionDataTest.php index b629e67..cc51309 100644 --- a/test/FunctionDataTest.php +++ b/test/FunctionDataTest.php @@ -10,8 +10,7 @@ #[TestDox("FunctionData")] final class FunctionDataTest extends TestCase { - #[Test] - #[TestDox("fromJson()")] + #[Test, TestDox("fromJson()")] function fromJson(): void { // It should return an instance with default values for an empty map. $data = FunctionData::fromJson(new \stdClass); @@ -26,8 +25,7 @@ function fromJson(): void { assertThat($data->lineNumber, equalTo(127)); } - #[Test] - #[TestDox("toString()")] + #[Test, TestDox("toString()")] function testToString(): void { // It should return a format like 'FN:,' when used as definition. assertThat((new FunctionData)->toString(true), equalTo("FN:0,")); diff --git a/test/LineCoverageTest.php b/test/LineCoverageTest.php index b7a1c1a..3dcebe5 100644 --- a/test/LineCoverageTest.php +++ b/test/LineCoverageTest.php @@ -10,8 +10,7 @@ #[TestDox("LineCoverage")] final class LineCoverageTest extends TestCase { - #[Test] - #[TestDox("fromJson()")] + #[Test, TestDox("fromJson()")] function fromJson(): void { // It should return an instance with default values for an empty map. $coverage = LineCoverage::fromJson(new \stdClass); @@ -30,8 +29,7 @@ function fromJson(): void { assertThat($data->lineNumber, equalTo(127)); } - #[Test] - #[TestDox("__toString()")] + #[Test, TestDox("__toString()")] function testToString(): void { // It should return a format like 'LF:\\nLH:'. assertThat((string) new LineCoverage, equalTo(strtr("LF:0{eol}LH:0", ["{eol}" => PHP_EOL]))); diff --git a/test/LineDataTest.php b/test/LineDataTest.php index 883096f..e0fab9c 100644 --- a/test/LineDataTest.php +++ b/test/LineDataTest.php @@ -10,8 +10,7 @@ #[TestDox("LineData")] final class LineDataTest extends TestCase { - #[Test] - #[TestDox("fromJson()")] + #[Test, TestDox("fromJson()")] function fromJson(): void { // It should return an instance with default values for an empty map. $data = LineData::fromJson(new \stdClass); @@ -26,8 +25,7 @@ function fromJson(): void { assertThat($data->lineNumber, equalTo(127)); } - #[Test] - #[TestDox("__toString()")] + #[Test, TestDox("__toString()")] function testToString(): void { // It should return a format like 'DA:,[,]'. assertThat((string) new LineData, equalTo("DA:0,0")); diff --git a/test/ReportTest.php b/test/ReportTest.php index 1042d5a..a9ef683 100644 --- a/test/ReportTest.php +++ b/test/ReportTest.php @@ -10,8 +10,7 @@ #[TestDox("Report")] final class ReportTest extends TestCase { - #[Test] - #[TestDox("fromJson()")] + #[Test, TestDox("fromJson()")] function fromJson(): void { // It should return an instance with default values for an empty map. $report = Report::fromJson(new \stdClass); @@ -25,8 +24,7 @@ function fromJson(): void { assertThat($report->testName, equalTo("LcovTest")); } - #[Test] - #[TestDox("parse()")] + #[Test, TestDox("parse()")] function parse(): void { $report = Report::parse(file_get_contents("res/lcov.info") ?: ""); @@ -78,8 +76,7 @@ function parse(): void { Report::parse("TN:Example"); } - #[Test] - #[TestDox("__toString()")] + #[Test, TestDox("__toString()")] function testToString(): void { // It should return a format like 'TN:'. assertThat((string) new Report(""), isEmpty()); diff --git a/test/SourceFileTest.php b/test/SourceFileTest.php index 5c7f8be..1bc5047 100644 --- a/test/SourceFileTest.php +++ b/test/SourceFileTest.php @@ -10,8 +10,7 @@ #[TestDox("SourceFile")] final class SourceFileTest extends TestCase { - #[Test] - #[TestDox("fromJson()")] + #[Test, TestDox("fromJson()")] function fromJson(): void { // It should return an instance with default values for an empty map. $sourceFile = SourceFile::fromJson(new \stdClass); @@ -34,8 +33,7 @@ function fromJson(): void { assertThat($sourceFile->path, equalTo("/home/cedx/lcov.php")); } - #[Test] - #[TestDox("__toString()")] + #[Test, TestDox("__toString()")] function testToString(): void { // It should return a format like 'SF:\\nend_of_record'. assertThat((string) new SourceFile(""), equalTo(strtr("SF:{eol}end_of_record", ["{eol}" => PHP_EOL])));