summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2024-09-27 11:58:17 +0100
committerGreg Roach <greg@subaqua.co.uk>2024-09-30 21:42:52 +0100
commit73f6d2b56f07f42ca02190f0dfc40653a1e91834 (patch)
tree43c1485b006a303805dbe8a7a078fed2d61e1a4d /tests
parente369eb399dbe9919e60d959c2d817ce7cfc7eff0 (diff)
downloadwebtrees-73f6d2b56f07f42ca02190f0dfc40653a1e91834.tar.gz
webtrees-73f6d2b56f07f42ca02190f0dfc40653a1e91834.tar.bz2
webtrees-73f6d2b56f07f42ca02190f0dfc40653a1e91834.zip
CodeStyle
Diffstat (limited to 'tests')
-rw-r--r--tests/app/Factories/EncodingFactoryTest.php2
-rw-r--r--tests/app/Module/AhnentafelReportModuleTest.php6
-rw-r--r--tests/app/Module/BirthDeathMarriageReportModuleTest.php5
-rw-r--r--tests/app/Module/BirthReportModuleTest.php5
-rw-r--r--tests/app/Module/CemeteryReportModuleTest.php5
-rw-r--r--tests/app/Module/ChangeReportModuleTest.php5
-rw-r--r--tests/app/Module/DeathReportModuleTest.php5
-rw-r--r--tests/app/Module/DescendancyReportModuleTest.php6
-rw-r--r--tests/app/Module/FactSourcesReportModuleTest.php5
-rw-r--r--tests/app/Module/FamilyGroupReportModuleTest.php5
-rw-r--r--tests/app/Module/IndividualFamiliesReportModuleTest.php6
-rw-r--r--tests/app/Module/IndividualReportModuleTest.php5
-rw-r--r--tests/app/Module/MarriageReportModuleTest.php5
-rw-r--r--tests/app/Module/MissingFactsReportModuleTest.php5
-rw-r--r--tests/app/Module/OccupationReportModuleTest.php5
-rw-r--r--tests/app/Module/PedigreeReportModuleTest.php5
-rw-r--r--tests/app/Module/RelatedIndividualsReportModuleTest.php5
17 files changed, 48 insertions, 37 deletions
diff --git a/tests/app/Factories/EncodingFactoryTest.php b/tests/app/Factories/EncodingFactoryTest.php
index cb987118ff..f1b9b7340e 100644
--- a/tests/app/Factories/EncodingFactoryTest.php
+++ b/tests/app/Factories/EncodingFactoryTest.php
@@ -122,8 +122,6 @@ class EncodingFactoryTest extends TestCase
static::assertCount(13, $encodings);
foreach ($encodings as $key => $value) {
- static::assertIsString($key);
- static::assertIsString($value);
static::assertInstanceOf(EncodingInterface::class, $factory->make($key));
}
}
diff --git a/tests/app/Module/AhnentafelReportModuleTest.php b/tests/app/Module/AhnentafelReportModuleTest.php
index dcb063c45d..c9344096ee 100644
--- a/tests/app/Module/AhnentafelReportModuleTest.php
+++ b/tests/app/Module/AhnentafelReportModuleTest.php
@@ -111,19 +111,19 @@ class AhnentafelReportModuleTest extends TestCase
'children' => ['id' => 'on'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
-
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/BirthDeathMarriageReportModuleTest.php b/tests/app/Module/BirthDeathMarriageReportModuleTest.php
index e38e3008a5..241438fad3 100644
--- a/tests/app/Module/BirthDeathMarriageReportModuleTest.php
+++ b/tests/app/Module/BirthDeathMarriageReportModuleTest.php
@@ -101,18 +101,19 @@ class BirthDeathMarriageReportModuleTest extends TestCase
'pageSize' => ['id' => 'A4'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/BirthReportModuleTest.php b/tests/app/Module/BirthReportModuleTest.php
index aa88bbbdf2..d6113962b5 100644
--- a/tests/app/Module/BirthReportModuleTest.php
+++ b/tests/app/Module/BirthReportModuleTest.php
@@ -108,18 +108,19 @@ class BirthReportModuleTest extends TestCase
'pageSize' => ['id' => 'A4'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/CemeteryReportModuleTest.php b/tests/app/Module/CemeteryReportModuleTest.php
index 5ec2b1197d..66c881233e 100644
--- a/tests/app/Module/CemeteryReportModuleTest.php
+++ b/tests/app/Module/CemeteryReportModuleTest.php
@@ -106,18 +106,19 @@ class CemeteryReportModuleTest extends TestCase
'pageSize' => ['id' => 'A4'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/ChangeReportModuleTest.php b/tests/app/Module/ChangeReportModuleTest.php
index caf1bda79b..767610a243 100644
--- a/tests/app/Module/ChangeReportModuleTest.php
+++ b/tests/app/Module/ChangeReportModuleTest.php
@@ -109,18 +109,19 @@ class ChangeReportModuleTest extends TestCase
'pageorient' => ['id' => 'landscape'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/DeathReportModuleTest.php b/tests/app/Module/DeathReportModuleTest.php
index f176219d40..c217fe3047 100644
--- a/tests/app/Module/DeathReportModuleTest.php
+++ b/tests/app/Module/DeathReportModuleTest.php
@@ -109,18 +109,19 @@ class DeathReportModuleTest extends TestCase
'pageSize' => ['id' => 'A4'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/DescendancyReportModuleTest.php b/tests/app/Module/DescendancyReportModuleTest.php
index 982c756f4f..608427ef3f 100644
--- a/tests/app/Module/DescendancyReportModuleTest.php
+++ b/tests/app/Module/DescendancyReportModuleTest.php
@@ -107,19 +107,19 @@ class DescendancyReportModuleTest extends TestCase
'pageSize' => ['id' => 'A4'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
-
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/FactSourcesReportModuleTest.php b/tests/app/Module/FactSourcesReportModuleTest.php
index 388386c09b..af932df87a 100644
--- a/tests/app/Module/FactSourcesReportModuleTest.php
+++ b/tests/app/Module/FactSourcesReportModuleTest.php
@@ -106,18 +106,19 @@ class FactSourcesReportModuleTest extends TestCase
'pageSize' => ['id' => 'A4'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/FamilyGroupReportModuleTest.php b/tests/app/Module/FamilyGroupReportModuleTest.php
index 6d6a3d2f95..0b9a039097 100644
--- a/tests/app/Module/FamilyGroupReportModuleTest.php
+++ b/tests/app/Module/FamilyGroupReportModuleTest.php
@@ -109,18 +109,19 @@ class FamilyGroupReportModuleTest extends TestCase
'pageSize' => ['id' => 'A4'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/IndividualFamiliesReportModuleTest.php b/tests/app/Module/IndividualFamiliesReportModuleTest.php
index e37d9c0148..d8c6f1669e 100644
--- a/tests/app/Module/IndividualFamiliesReportModuleTest.php
+++ b/tests/app/Module/IndividualFamiliesReportModuleTest.php
@@ -112,19 +112,19 @@ class IndividualFamiliesReportModuleTest extends TestCase
'colors' => ['id' => 'on'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
-
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/IndividualReportModuleTest.php b/tests/app/Module/IndividualReportModuleTest.php
index bc5b4c7168..8abc0940c6 100644
--- a/tests/app/Module/IndividualReportModuleTest.php
+++ b/tests/app/Module/IndividualReportModuleTest.php
@@ -106,18 +106,19 @@ class IndividualReportModuleTest extends TestCase
'pageSize' => ['id' => 'A4'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/MarriageReportModuleTest.php b/tests/app/Module/MarriageReportModuleTest.php
index 463c04bb37..61833f9240 100644
--- a/tests/app/Module/MarriageReportModuleTest.php
+++ b/tests/app/Module/MarriageReportModuleTest.php
@@ -106,18 +106,19 @@ class MarriageReportModuleTest extends TestCase
'pageSize' => ['id' => 'A4'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/MissingFactsReportModuleTest.php b/tests/app/Module/MissingFactsReportModuleTest.php
index 817a67fdc0..8de25ebcbb 100644
--- a/tests/app/Module/MissingFactsReportModuleTest.php
+++ b/tests/app/Module/MissingFactsReportModuleTest.php
@@ -118,18 +118,19 @@ class MissingFactsReportModuleTest extends TestCase
'freli' => ['id' => 'on'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/OccupationReportModuleTest.php b/tests/app/Module/OccupationReportModuleTest.php
index 58583d507a..36dd3fa91e 100644
--- a/tests/app/Module/OccupationReportModuleTest.php
+++ b/tests/app/Module/OccupationReportModuleTest.php
@@ -103,18 +103,19 @@ class OccupationReportModuleTest extends TestCase
'sortby' => ['id' => 'NAME'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/PedigreeReportModuleTest.php b/tests/app/Module/PedigreeReportModuleTest.php
index caf225f85a..105be8daed 100644
--- a/tests/app/Module/PedigreeReportModuleTest.php
+++ b/tests/app/Module/PedigreeReportModuleTest.php
@@ -103,18 +103,19 @@ class PedigreeReportModuleTest extends TestCase
'orientation' => ['id' => 'portrait'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}
diff --git a/tests/app/Module/RelatedIndividualsReportModuleTest.php b/tests/app/Module/RelatedIndividualsReportModuleTest.php
index 27567568a4..652044f99d 100644
--- a/tests/app/Module/RelatedIndividualsReportModuleTest.php
+++ b/tests/app/Module/RelatedIndividualsReportModuleTest.php
@@ -109,18 +109,19 @@ class RelatedIndividualsReportModuleTest extends TestCase
'pageSize' => ['id' => 'A4'],
];
- $report = new ReportParserSetup($xml);
- self::assertNotEmpty($report->reportProperties());
+ new ReportParserSetup($xml);
ob_start();
new ReportParserGenerate($xml, new HtmlRenderer(), $vars, $tree);
$html = ob_get_clean();
+ self::assertIsString($html);
self::assertStringStartsWith('<', $html);
self::assertStringEndsWith('>', $html);
ob_start();
new ReportParserGenerate($xml, new PdfRenderer(), $vars, $tree);
$pdf = ob_get_clean();
+ self::assertIsString($pdf);
self::assertStringStartsWith('%PDF', $pdf);
self::assertStringEndsWith("%%EOF\n", $pdf);
}