Merge pull request #416 from creative-commoners/pulls/5/phpunit11

DEP Use PHPUnit 11
This commit is contained in:
Guy Sartorelli 2024-09-18 15:33:18 +12:00 committed by GitHub
commit ac1a5eedf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 12 deletions

View File

@ -30,7 +30,7 @@
"silverstripe/framework": "^6"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^11.3",
"squizlabs/php_codesniffer": "^3.7",
"silverstripe/versioned": "^3",
"silverstripe/standards": "^1",

View File

@ -27,6 +27,7 @@ use Symbiote\GridFieldExtensions\Tests\Stub\TitleObject;
use Symbiote\GridFieldExtensions\Tests\Stub\TitleSortedObject;
use Symbiote\GridFieldExtensions\Tests\Stub\TitleArraySortedObject;
use Symbiote\GridFieldExtensions\Tests\Stub\ThroughIntermediaryVersioned;
use PHPUnit\Framework\Attributes\DataProvider;
/**
* Tests for the {@link GridFieldOrderableRows} component.
@ -61,7 +62,7 @@ class GridFieldOrderableRowsTest extends SapphireTest
ThroughBelongsVersioned::class,
];
public function reorderItemsProvider()
public static function reorderItemsProvider()
{
return [
[StubParent::class . '.parent', 'MyHasMany', 'Sort'],
@ -75,9 +76,7 @@ class GridFieldOrderableRowsTest extends SapphireTest
];
}
/**
* @dataProvider reorderItemsProvider
*/
#[DataProvider('reorderItemsProvider')]
public function testReorderItems($fixtureID, $relationName, $sortName)
{
$orderable = new GridFieldOrderableRows($sortName);
@ -212,9 +211,6 @@ class GridFieldOrderableRowsTest extends SapphireTest
$this->assertEquals($desiredOrder, $newOrder);
}
/**
* @covers \Symbiote\GridFieldExtensions\GridFieldOrderableRows::getSortTable
*/
public function testGetSortTable()
{
$orderable = new GridFieldOrderableRows();
@ -315,9 +311,7 @@ class GridFieldOrderableRowsTest extends SapphireTest
$this->assertTrue($differenceFound);
}
/**
* @dataProvider provideGetManipulatedData
*/
#[DataProvider('provideGetManipulatedData')]
public function testGetManipulatedData(string $dataClass, string $listClass, array $data, array $expected)
{
$list = $listClass == DataList::class ? new DataList($dataClass) : new ArrayList();
@ -336,7 +330,7 @@ class GridFieldOrderableRowsTest extends SapphireTest
$this->assertSame($expected, $sortedList->column($col));
}
public function provideGetManipulatedData(): array
public static function provideGetManipulatedData(): array
{
return [
[