Skip to content

Commit

Permalink
Merge pull request #885 from creative-commoners/pulls/8/phpunit11
Browse files Browse the repository at this point in the history
DEP Use PHPUnit 11
  • Loading branch information
tractorcow authored Sep 9, 2024
2 parents 72e2fa6 + 8264329 commit 8bb4b9e
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/php/Extension/FluentExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public function testLocalisedFieldsCanBeSorted($locale, array $sortArgs, $expect
/**
* @return array[] Keys: Locale, sorting arguments, expected titles in result
*/
public function sortRecordProvider()
public static function sortRecordProvider()
{
return [
/**
Expand Down
6 changes: 3 additions & 3 deletions tests/php/Extension/FluentSiteTreeExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function testGetLocales()
* - page id
* - expected link
*/
public function provideURLTests()
public static function provideURLTests()
{
return [
// Non-domain tests
Expand Down Expand Up @@ -473,7 +473,7 @@ public function testHomeNotVisibleInCMSOneConfigExact()
/**
* @return array[]
*/
public function localePrefixUrlProvider()
public static function localePrefixUrlProvider()
{
return [
'locale_with_domain' => ['en_US', 'about', 'http://www.example.com/usa/'],
Expand Down Expand Up @@ -521,7 +521,7 @@ public function testPageVisibilityWithFallback($cmsMode, $frontendMode, bool $is
});
}

public function localeFallbackProvider(): array
public static function localeFallbackProvider(): array
{
return [
'Frontend / no inheritance' => [
Expand Down
4 changes: 2 additions & 2 deletions tests/php/Extension/LocalisedCopyTest/DuplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function testEditWithInheritedRelation(string $locale, bool $duplicated,
});
}

public function localesProvider(): array
public static function localesProvider(): array
{
return [
['en_NZ', false, true],
Expand All @@ -248,7 +248,7 @@ public function localesProvider(): array
];
}

public function copyStateProvider(): array
public static function copyStateProvider(): array
{
return [
[false],
Expand Down
4 changes: 2 additions & 2 deletions tests/php/Extension/LocalisedVersionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function testArchive(): void
});
}

public function latestVersionsProvider(): array
public static function latestVersionsProvider(): array
{
return [
[null, 6],
Expand All @@ -227,7 +227,7 @@ public function latestVersionsProvider(): array
];
}

public function listVersionsProvider(): array
public static function listVersionsProvider(): array
{
return [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Middleware/DetectLocaleMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function testGetLocalePriority($url, $routeParams, $queryParams, $persist
/**
* @return array[] List of tests with arguments: $url, $routeParams, $queryParams, $persisted, $header, $expected
*/
public function localePriorityProvider()
public static function localePriorityProvider()
{
return [/*
// First priority: controller routing params
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Middleware/InitStateMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function testGetIsFrontend($url, $getVars, $expected)
/**
* @return array[]
*/
public function isFrontendProvider()
public static function isFrontendProvider()
{
return [
['admin', [], false],
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Model/LocalDateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function testSwitchLocales($locale, $expectedTime)
});
}

public function provideTestSwitchLocales()
public static function provideTestSwitchLocales()
{
return [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Model/LocaleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function testIsLocale($locale, $input, $expected)
/**
* @return array[]
*/
public function isLocaleProvider()
public static function isLocaleProvider()
{
return [
['en_NZ', 'en_NZ', true],
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Task/InitialPageLocalisationTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function testInitialPageLocalisation(bool $publish, int $limit, array $lo
$this->assertEquals($published, $pages);
}

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

0 comments on commit 8bb4b9e

Please sign in to comment.