Upgrade tests to PhpUnit 10 (#5252)

This commit is contained in:
Kevin Papst
2024-12-22 01:25:30 +01:00
committed by GitHub
parent 9bd37fb695
commit c7f0508707
377 changed files with 3308 additions and 3409 deletions

View File

@@ -16,7 +16,7 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Style\Style;
use PHPUnit\Framework\TestCase;
abstract class AbstractFormatterTest extends TestCase
abstract class AbstractFormatterTestCase extends TestCase
{
abstract protected function getFormatter(): CellFormatterInterface;

View File

@@ -16,7 +16,7 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
/**
* @covers \App\Export\Spreadsheet\CellFormatter\ArrayFormatter
*/
class ArrayFormatterTest extends AbstractFormatterTest
class ArrayFormatterTest extends AbstractFormatterTestCase
{
protected function getFormatter(): CellFormatterInterface
{

View File

@@ -16,7 +16,7 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
/**
* @covers \App\Export\Spreadsheet\CellFormatter\BooleanFormatter
*/
class BooleanFormatterTest extends AbstractFormatterTest
class BooleanFormatterTest extends AbstractFormatterTestCase
{
protected function getFormatter(): CellFormatterInterface
{

View File

@@ -19,7 +19,7 @@ use PhpOffice\PhpSpreadsheet\Style\Style;
/**
* @covers \App\Export\Spreadsheet\CellFormatter\DateFormatter
*/
class DateFormatterTest extends AbstractFormatterTest
class DateFormatterTest extends AbstractFormatterTestCase
{
private $date;

View File

@@ -18,7 +18,7 @@ use PhpOffice\PhpSpreadsheet\Style\Style;
/**
* @covers \App\Export\Spreadsheet\CellFormatter\DateTimeFormatter
*/
class DateTimeFormatterTest extends AbstractFormatterTest
class DateTimeFormatterTest extends AbstractFormatterTestCase
{
private $date;

View File

@@ -18,7 +18,7 @@ use PhpOffice\PhpSpreadsheet\Style\Style;
/**
* @covers \App\Export\Spreadsheet\CellFormatter\DurationFormatter
*/
class DurationFormatterTest extends AbstractFormatterTest
class DurationFormatterTest extends AbstractFormatterTestCase
{
protected function getFormatter(): CellFormatterInterface
{

View File

@@ -18,7 +18,7 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
/**
* @covers \App\Export\Spreadsheet\CellFormatter\StringFormatter
*/
class StringFormatterTest extends AbstractFormatterTest
class StringFormatterTest extends AbstractFormatterTestCase
{
protected function getFormatter(): CellFormatterInterface
{
@@ -59,8 +59,7 @@ class StringFormatterTest extends AbstractFormatterTest
$spreadsheet = new Spreadsheet();
$worksheet = $spreadsheet->getActiveSheet();
$test = new StringHelperTest();
foreach ($test->getDdeAttackStrings() as $attackString) {
foreach (StringHelperTest::getDdeAttackStrings() as $attackString) {
$value = $attackString[0];
// PHPOffice converts that, so simply skip it
if (!str_contains($value, "\r")) {

View File

@@ -18,7 +18,7 @@ use PhpOffice\PhpSpreadsheet\Style\Style;
/**
* @covers \App\Export\Spreadsheet\CellFormatter\TimeFormatter
*/
class TimeFormatterTest extends AbstractFormatterTest
class TimeFormatterTest extends AbstractFormatterTestCase
{
private $date;