Skip to content

Commit

Permalink
Cs
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored and github-actions[bot] committed Sep 28, 2023
1 parent 8f17831 commit cfa6fb1
Show file tree
Hide file tree
Showing 47 changed files with 182 additions and 182 deletions.
4 changes: 2 additions & 2 deletions tests/Action/SetObjectFieldValueActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function testSetObjectFieldValueAction(): void
/**
* @phpstan-return iterable<array-key, array{\DateTimeZone|string|false|null, \DateTimeZone}>
*/
public function getTimeZones(): iterable
public function provideSetObjectFieldValueActionWithDateCases(): iterable
{
$default = new \DateTimeZone(date_default_timezone_get());
$custom = new \DateTimeZone('Europe/Rome');
Expand All @@ -147,7 +147,7 @@ public function getTimeZones(): iterable
}

/**
* @dataProvider getTimeZones
* @dataProvider provideSetObjectFieldValueActionWithDateCases
*/
public function testSetObjectFieldValueActionWithDate(
\DateTimeZone|string|false|null $timezone,
Expand Down
8 changes: 4 additions & 4 deletions tests/Admin/AdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ public function testGetBatchActionsWithoutBatchRoute(): void
}

/**
* @dataProvider getListModeProvider
* @dataProvider provideGetListModeCases
*/
public function testGetListMode(string $expected, ?Request $request = null): void
{
Expand All @@ -1925,7 +1925,7 @@ public function testGetListMode(string $expected, ?Request $request = null): voi
/**
* @phpstan-return iterable<array-key, array{string, Request|null}>
*/
public function getListModeProvider(): iterable
public function provideGetListModeCases(): iterable
{
yield ['list', null];

Expand All @@ -1951,7 +1951,7 @@ public function getListModeProvider(): iterable
}

/**
* @dataProvider getListModeProvider2
* @dataProvider provideGetListModeWithCustomListModesCases
*/
public function testGetListModeWithCustomListModes(string $expected, ?Request $request = null): void
{
Expand All @@ -1972,7 +1972,7 @@ public function testGetListModeWithCustomListModes(string $expected, ?Request $r
/**
* @phpstan-return iterable<array-key, array{string, Request|null}>
*/
public function getListModeProvider2(): iterable
public function provideGetListModeWithCustomListModesCases(): iterable
{
yield ['mosaic', null];

Expand Down
4 changes: 2 additions & 2 deletions tests/Admin/BreadcrumbsBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function testChildGetBreadCrumbs(): void
/**
* @phpstan-return array<array{string}>
*/
public function actionProvider(): iterable
public function provideBuildBreadcrumbsCases(): iterable
{
yield ['my_action'];
yield ['list'];
Expand All @@ -145,7 +145,7 @@ public function actionProvider(): iterable
}

/**
* @dataProvider actionProvider
* @dataProvider provideBuildBreadcrumbsCases
*/
public function testBuildBreadcrumbs(string $action): void
{
Expand Down
20 changes: 10 additions & 10 deletions tests/Admin/PoolTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function testGetAdminByAdminCodeWithCodeNotChild(): void
}

/**
* @dataProvider getEmptyRootAdminServiceNames
* @dataProvider provideGetAdminByAdminCodeWithInvalidRootCodeCases
*/
public function testGetAdminByAdminCodeWithInvalidRootCode(string $adminId): void
{
Expand All @@ -253,15 +253,15 @@ public function testGetAdminByAdminCodeWithInvalidRootCode(string $adminId): voi
/**
* @phpstan-return iterable<array-key, array{string}>
*/
public function getEmptyRootAdminServiceNames(): iterable
public function provideGetAdminByAdminCodeWithInvalidRootCodeCases(): iterable
{
yield [''];
yield [' '];
yield ['|sonata.news.admin.child_of_empty_code'];
}

/**
* @dataProvider getInvalidChildAdminServiceNames
* @dataProvider provideGetAdminByAdminCodeWithInvalidChildCodeCases
*/
public function testGetAdminByAdminCodeWithInvalidChildCode(string $adminId): void
{
Expand All @@ -287,15 +287,15 @@ public function testGetAdminByAdminCodeWithInvalidChildCode(string $adminId): vo
/**
* @phpstan-return iterable<array-key, array{string}>
*/
public function getInvalidChildAdminServiceNames(): iterable
public function provideGetAdminByAdminCodeWithInvalidChildCodeCases(): iterable
{
yield ['admin1|'];
yield ['admin1|nonexistent_code'];
yield ['admin1||admin3'];
}

/**
* @dataProvider getAdminServiceNamesToCheck
* @dataProvider provideHasAdminByAdminCodeCases
*/
public function testHasAdminByAdminCode(string $adminId): void
{
Expand Down Expand Up @@ -327,14 +327,14 @@ public function testHasAdminByAdminCode(string $adminId): void
/**
* @phpstan-return iterable<array-key, array{string}>
*/
public function getAdminServiceNamesToCheck(): iterable
public function provideHasAdminByAdminCodeCases(): iterable
{
yield ['sonata.news.admin.post'];
yield ['sonata.news.admin.post|sonata.news.admin.comment'];
}

/**
* @dataProvider getInvalidAdminServiceNamesToCheck
* @dataProvider provideHasAdminByAdminCodeWithInvalidCodesCases
*/
public function testHasAdminByAdminCodeWithInvalidCodes(string $adminId): void
{
Expand All @@ -351,7 +351,7 @@ public function testHasAdminByAdminCodeWithInvalidCodes(string $adminId): void
/**
* @phpstan-return iterable<array-key, array{string}>
*/
public function getInvalidAdminServiceNamesToCheck(): iterable
public function provideHasAdminByAdminCodeWithInvalidCodesCases(): iterable
{
yield [''];
yield [' '];
Expand All @@ -364,7 +364,7 @@ public function testHasAdminByAdminCodeWithNonExistentCode(): void
}

/**
* @dataProvider getInvalidChildAdminServiceNamesToCheck
* @dataProvider provideHasAdminByAdminCodeWithInvalidChildCodesCases
*/
public function testHasAdminByAdminCodeWithInvalidChildCodes(string $adminId): void
{
Expand All @@ -383,7 +383,7 @@ public function testHasAdminByAdminCodeWithInvalidChildCodes(string $adminId): v
/**
* @phpstan-return iterable<array-key, array{string}>
*/
public function getInvalidChildAdminServiceNamesToCheck(): iterable
public function provideHasAdminByAdminCodeWithInvalidChildCodesCases(): iterable
{
yield ['sonata.news.admin.post|'];
yield ['sonata.news.admin.post|nonexistent_code'];
Expand Down
4 changes: 2 additions & 2 deletions tests/ArgumentResolver/AdminValueResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
final class AdminValueResolverTest extends TestCase
{
/**
* @dataProvider provideInvalidData
* @dataProvider provideWithInvalidDataCases
*/
public function testWithInvalidData(Request $request, ArgumentMetadata $argumentMetadata): void
{
Expand All @@ -50,7 +50,7 @@ public function testWithInvalidData(Request $request, ArgumentMetadata $argument
/**
* @phpstan-return iterable<array-key, array{Request, ArgumentMetadata}>
*/
public function provideInvalidData(): iterable
public function provideWithInvalidDataCases(): iterable
{
yield 'Object with no type' => [
static::createRequest(),
Expand Down
4 changes: 2 additions & 2 deletions tests/ArgumentResolver/ProxyQueryResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function setUp(): void
}

/**
* @dataProvider provideInvalidData
* @dataProvider provideWithInvalidDataCases
*/
public function testWithInvalidData(Request $request, ArgumentMetadata $argumentMetadata): void
{
Expand All @@ -43,7 +43,7 @@ public function testWithInvalidData(Request $request, ArgumentMetadata $argument
/**
* @phpstan-return iterable<array-key, array{Request, ArgumentMetadata}>
*/
public function provideInvalidData(): iterable
public function provideWithInvalidDataCases(): iterable
{
yield 'Object with no type' => [
static::createRequest(),
Expand Down
4 changes: 2 additions & 2 deletions tests/Bridge/Exporter/AdminExporterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class AdminExporterTest extends TestCase
/**
* @phpstan-return iterable<array-key, array{string[], string[], string[]}>
*/
public function provideExportFormats(): iterable
public function provideAdminHasPriorityOverGlobalSettingsCases(): iterable
{
yield 'no override' => [['xls'], [], ['xls']];
yield 'override in admin' => [['csv'], ['csv'], ['xls']];
Expand All @@ -35,7 +35,7 @@ public function provideExportFormats(): iterable
* @param string[] $adminFormats
* @param string[] $globalFormats
*
* @dataProvider provideExportFormats
* @dataProvider provideAdminHasPriorityOverGlobalSettingsCases
*/
public function testAdminHasPriorityOverGlobalSettings(array $expectedFormats, array $adminFormats, array $globalFormats): void
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Builder/AbstractFormContractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function testAdminClassAttachForNotMappedField(): void
/**
* @phpstan-param class-string $formType
*
* @dataProvider getFieldDescriptionValidationProvider
* @dataProvider provideThrowsExceptionWithInvalidFieldDescriptionInGetDefaultOptionsCases
*/
public function testThrowsExceptionWithInvalidFieldDescriptionInGetDefaultOptions(string $formType): void
{
Expand All @@ -225,7 +225,7 @@ public function testThrowsExceptionWithInvalidFieldDescriptionInGetDefaultOption
/**
* @phpstan-return iterable<array-key, array{0: class-string}>
*/
public function getFieldDescriptionValidationProvider(): iterable
public function provideThrowsExceptionWithInvalidFieldDescriptionInGetDefaultOptionsCases(): iterable
{
yield 'ModelAutocompleteType, no target model' => [
ModelAutocompleteType::class,
Expand Down
Loading

0 comments on commit cfa6fb1

Please sign in to comment.