mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Merge pull request #416 from creative-commoners/pulls/5/phpunit11
DEP Use PHPUnit 11
This commit is contained in:
commit
ac1a5eedf5
@ -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",
|
||||
|
@ -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 [
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user