Upgrade tests to PhpUnit 10 (#5252)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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")) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user