Skip to content

Commit

Permalink
DEP Use PHPUnit 11
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Sep 9, 2024
1 parent e95225b commit 62b66dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"silverstripe/vendor-plugin": "^2"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^11.3",
"squizlabs/php_codesniffer": "^3.7",
"silverstripe/asset-admin": "^3",
"silverstripe/cms": "^6",
Expand Down
13 changes: 5 additions & 8 deletions tests/php/CampaignAdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use SilverStripe\Security\Permission;
use SilverStripe\Versioned\ChangeSet;
use SilverStripe\Versioned\ChangeSetItem;
use PHPUnit\Framework\Attributes\DataProvider;

class CampaignAdminTest extends FunctionalTest
{
Expand Down Expand Up @@ -137,7 +138,7 @@ public function testFilters()
);
}

public function readCampaignDataProvider()
public static function readCampaignDataProvider()
{
return [
'valid campaign' => ['change1', 'CMS_ACCESS_CampaignAdmin', 200],
Expand All @@ -147,9 +148,7 @@ public function readCampaignDataProvider()
];
}

/**
* @dataProvider readCampaignDataProvider
*/
#[DataProvider('readCampaignDataProvider')]
public function testReadCampaign(
string $changesetName,
string $permission,
Expand All @@ -162,7 +161,7 @@ public function testReadCampaign(
$this->assertEquals($expectedResponseCode, $response->getStatusCode());
}

public function provideRemoveCampaignItem(): array
public static function provideRemoveCampaignItem(): array
{
return [
'open campaign' => [false, false, 204],
Expand All @@ -171,9 +170,7 @@ public function provideRemoveCampaignItem(): array
];
}

/**
* @dataProvider provideRemoveCampaignItem
*/
#[DataProvider('provideRemoveCampaignItem')]
public function testRemoveCampaignItem(
bool $isPublished,
bool $isWrongID,
Expand Down

0 comments on commit 62b66dd

Please sign in to comment.