Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEP Use PHPUnit 11 #416

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 5 additions & 11 deletions tests/GridFieldOrderableRowsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
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.
Expand Down Expand Up @@ -61,7 +62,7 @@ class GridFieldOrderableRowsTest extends SapphireTest
ThroughBelongsVersioned::class,
];

public function reorderItemsProvider()
public static function reorderItemsProvider()
{
return [
[StubParent::class . '.parent', 'MyHasMany', 'Sort'],
Expand All @@ -75,9 +76,7 @@ public function reorderItemsProvider()
];
}

/**
* @dataProvider reorderItemsProvider
*/
#[DataProvider('reorderItemsProvider')]
public function testReorderItems($fixtureID, $relationName, $sortName)
{
$orderable = new GridFieldOrderableRows($sortName);
Expand Down Expand Up @@ -212,9 +211,6 @@ public function testSortableChildClass()
$this->assertEquals($desiredOrder, $newOrder);
}

/**
* @covers \Symbiote\GridFieldExtensions\GridFieldOrderableRows::getSortTable
*/
public function testGetSortTable()
{
$orderable = new GridFieldOrderableRows();
Expand Down Expand Up @@ -315,9 +311,7 @@ public function testReorderItemsSubclassVersioned()
$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();
Expand All @@ -336,7 +330,7 @@ public function testGetManipulatedData(string $dataClass, string $listClass, arr
$this->assertSame($expected, $sortedList->column($col));
}

public function provideGetManipulatedData(): array
public static function provideGetManipulatedData(): array
{
return [
[
Expand Down
Loading