Skip to content

Commit eb34e02

Browse files
authored
Restore Tcpdf/Dompdf to Samples in Test Suite (#2814)
They were dropped because they weren't ready for PHP8 when we were. They are ready now.
1 parent 3553050 commit eb34e02

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

tests/PhpSpreadsheetTests/Helper/SampleTest.php

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ class SampleTest extends TestCase
1111
* @runInSeparateProcess
1212
* @preserveGlobalState disabled
1313
* @dataProvider providerSample
14-
*
15-
* @param mixed $sample
1614
*/
17-
public function testSample($sample): void
15+
public function testSample(string $sample): void
1816
{
1917
// Suppress output to console
2018
$this->setOutputCallback(function (): void {
@@ -32,18 +30,8 @@ public function providerSample(): array
3230
'Chart/32_Chart_read_write_HTML.php', // idem
3331
'Chart/35_Chart_render.php', // idem
3432
];
35-
// TCPDF and DomPDF libraries don't support PHP8 yet
36-
if (\PHP_VERSION_ID >= 80000) {
37-
$skipped = array_merge(
38-
$skipped,
39-
[
40-
'Pdf/21_Pdf_Domdf.php',
41-
'Pdf/21_Pdf_TCPDF.php',
42-
]
43-
);
44-
}
4533

46-
// Unfortunately some tests are too long be ran with code-coverage
34+
// Unfortunately some tests are too long to run with code-coverage
4735
// analysis on GitHub Actions, so we need to exclude them
4836
global $argv;
4937
if (in_array('--coverage-clover', $argv)) {
@@ -58,9 +46,6 @@ public function providerSample(): array
5846
$result = [];
5947
foreach ($helper->getSamples() as $samples) {
6048
foreach ($samples as $sample) {
61-
// if (array_pop(explode('/', $sample)) !== 'DGET.php') {
62-
// continue;
63-
// }
6449
if (!in_array($sample, $skipped)) {
6550
$file = 'samples/' . $sample;
6651
$result[$sample] = [$file];

0 commit comments

Comments
 (0)