Skip to content

Commit

Permalink
Simplify Test Bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
oleibman committed Nov 13, 2024
1 parent 4545ecf commit db89fe2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
5 changes: 5 additions & 0 deletions tests/PhpSpreadsheetTests/Chart/ChartsDynamicTitleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
use PhpOffice\PhpSpreadsheet\Writer\Xlsx as XlsxWriter;
use PhpOffice\PhpSpreadsheetTests\Functional\AbstractFunctional;

/**
* Seems to need to be separate for Php8.4 PhpUnit9 combination.
*
* @runTestsInSeparateProcesses
*/
class ChartsDynamicTitleTest extends AbstractFunctional
{
protected function tearDown(): void
Expand Down
14 changes: 0 additions & 14 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,6 @@ function phpunit10ErrorHandler(int $errno, string $errstr, string $filename, int
return true; // message suppressed - stop error handling
}

// This code applies only when running release210 with Php8.4.
// I don't get it at all. I think mitoteam is the victim of circumstance.
// We need to run PhpUnit 9 because we need to support Php8.0.
// We are at the highest release of PhpUnit9,
// but it refers to E_STRICT,
// which is deprecated in 8.4.
if (
str_contains($errstr, 'Constant ')
&& str_contains($errstr, ' already defined')
&& str_contains($filename, 'mitoteam')
) {
return true;
}

if (!method_exists(PHPUnit\Framework\TestCase::class, 'setOutputCallback')) {
throw new Exception("$errstr $filename $lineno");
}
Expand Down

0 comments on commit db89fe2

Please sign in to comment.