Skip to content

Commit

Permalink
Fix
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 d353bdc commit a14140e
Show file tree
Hide file tree
Showing 18 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "^0.18",
"psalm/plugin-symfony": "^5.0",
"rector/rector": "^0.17",
"rector/rector": "^0.18",
"sonata-project/admin-bundle": "^4.9",
"sonata-project/block-bundle": "^4.11 || ^5.0",
"sonata-project/classification-bundle": "^4.0",
Expand Down
4 changes: 2 additions & 2 deletions tests/CDN/CloudFrontVersion3Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function setUp(): void
}

/**
* @dataProvider provideCloudFrontTestCases
* @dataProvider provideCloudFrontCases
*/
public function testCloudFront(
string $expectedPath,
Expand Down Expand Up @@ -85,7 +85,7 @@ public function testCloudFront(
/**
* @phpstan-return iterable<array{string, string, string, string, int, string}>
*/
public function provideCloudFrontTestCases(): iterable
public function provideCloudFrontCases(): iterable
{
yield ['/foo/bar.jpg', '/foo', '/bar.jpg', 'ivalidation_id_42', CloudFrontVersion3::STATUS_WAITING, 'InProgress'];
yield ['/foo/bar.jpg', '/foo', 'bar.jpg', 'ivalidation_a', CloudFrontVersion3::STATUS_OK, 'Completed'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
final class ThumbnailCompilerPassTest extends TestCase
{
/**
* @dataProvider processProvider
* @dataProvider provideProcessCases
*
* @phpstan-param class-string $class
*/
Expand All @@ -44,7 +44,7 @@ public function testProcess(bool $expected, string $class, ?ParameterBagInterfac
/**
* @phpstan-return iterable<array{0: bool, 1: class-string|string, 2?: ParameterBagInterface}>
*/
public function processProvider(): iterable
public function provideProcessCases(): iterable
{
yield [true, FormatThumbnail::class];
yield [false, MessengerThumbnail::class];
Expand Down
12 changes: 6 additions & 6 deletions tests/DependencyInjection/SonataMediaExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function testDefaultAdapter(): void
}

/**
* @dataProvider dataAdapter
* @dataProvider provideAdapterCases
*
* @phpstan-param class-string $type
*/
Expand All @@ -105,7 +105,7 @@ public function testAdapter(string $serviceId, string $type): void
/**
* @phpstan-return iterable<array{string, class-string}>
*/
public function dataAdapter(): iterable
public function provideAdapterCases(): iterable
{
yield ['sonata.media.adapter.image.gd', GdImagine::class];
yield ['sonata.media.adapter.image.gmagick', GmagicImagine::class];
Expand Down Expand Up @@ -147,7 +147,7 @@ public function testWithHttpClient(): void
}

/**
* @dataProvider dataResizer
* @dataProvider provideResizerCases
*
* @phpstan-param class-string $type
*/
Expand All @@ -161,7 +161,7 @@ public function testResizer(string $serviceId, string $type): void
/**
* @phpstan-return iterable<array{string, class-string}>
*/
public function dataResizer(): iterable
public function provideResizerCases(): iterable
{
yield ['sonata.media.resizer.simple', SimpleResizer::class];
yield ['sonata.media.resizer.square', SquareResizer::class];
Expand Down Expand Up @@ -236,7 +236,7 @@ public function testLoadWithSonataAdminCustomConfiguration(): void
}

/**
* @dataProvider dataFilesystemConfigurationAwsV3
* @dataProvider provideLoadWithFilesystemConfigurationV3Cases
*
* @param array<string, mixed> $expected
* @param array<string, mixed> $configs
Expand Down Expand Up @@ -270,7 +270,7 @@ public function testLoadWithFilesystemConfigurationV3(
/**
* @phpstan-return iterable<array{array<string, mixed>, array<string, mixed>}>
*/
public function dataFilesystemConfigurationAwsV3(): iterable
public function provideLoadWithFilesystemConfigurationV3Cases(): iterable
{
yield [
[
Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/Admin/GalleryAdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static function provideCrudUrlsCases(): iterable
}

/**
* @dataProvider provideFormUrlsCases
* @dataProvider provideFormsUrlsCases
*
* @param array<string, mixed> $parameters
* @param array<string, mixed> $fieldValues
Expand All @@ -73,7 +73,7 @@ public function testFormsUrls(string $url, array $parameters, string $button, ar
*
* @phpstan-return iterable<array{0: string, 1: array<string, mixed>, 2: string, 3?: array<string, mixed>}>
*/
public static function provideFormUrlsCases(): iterable
public static function provideFormsUrlsCases(): iterable
{
yield 'Create Gallery' => ['/admin/tests/app/gallery/create', [
'uniqid' => 'gallery',
Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/Admin/GalleryItemAdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static function provideCrudUrlsCases(): iterable
}

/**
* @dataProvider provideFormUrlsCases
* @dataProvider provideFormsUrlsCases
*
* @param array<string, mixed> $parameters
* @param array<string, mixed> $fieldValues
Expand All @@ -73,7 +73,7 @@ public function testFormsUrls(string $url, array $parameters, string $button, ar
*
* @phpstan-return iterable<array{0: string, 1: array<string, mixed>, 2: string, 3?: array<string, mixed>}>
*/
public static function provideFormUrlsCases(): iterable
public static function provideFormsUrlsCases(): iterable
{
yield 'Create Gallery Item' => ['/admin/tests/app/galleryitem/create', [
'uniqid' => 'galleryItem',
Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/Admin/MediaAdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static function provideCrudUrlsCases(): iterable
}

/**
* @dataProvider provideFormUrlsCases
* @dataProvider provideFormsUrlsCases
*
* @param array<string, mixed> $parameters
* @param array<string, mixed> $fieldValues
Expand All @@ -95,7 +95,7 @@ public function testFormsUrls(string $url, array $parameters, string $button, ar
*
* @phpstan-return iterable<array{0: string, 1: array<string, mixed>, 2: string, 3?: array<string, mixed>}>
*/
public static function provideFormUrlsCases(): iterable
public static function provideFormsUrlsCases(): iterable
{
yield 'Create Media Image' => ['/admin/tests/app/media/create', [
'provider' => 'sonata.media.provider.image',
Expand Down
4 changes: 2 additions & 2 deletions tests/Messenger/GenerateThumbnailsHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function testMediaProviderNotFoundOnPool(): void
}

/**
* @dataProvider provideMediaIds
* @dataProvider provideGenerateThumbnailsCases
*/
public function testGenerateThumbnails(int|string $id): void
{
Expand All @@ -104,7 +104,7 @@ public function testGenerateThumbnails(int|string $id): void
/**
* @phpstan-return iterable<array{int|string}>
*/
public function provideMediaIds(): iterable
public function provideGenerateThumbnailsCases(): iterable
{
yield [25];
yield ['25'];
Expand Down
4 changes: 2 additions & 2 deletions tests/Metadata/AmazonMetadataBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
final class AmazonMetadataBuilderTest extends TestCase
{
/**
* @dataProvider provider
* @dataProvider provideAmazonCases
*
* @param array<string, string|int> $mediaAttributes
* @param array<string, mixed> $expected
Expand All @@ -51,7 +51,7 @@ public function testAmazon(array $settings, array $mediaAttributes, array $expec
/**
* @phpstan-return iterable<array{AmazonSettings, array<string, string|int>, array<string, mixed>}>
*/
public function provider(): iterable
public function provideAmazonCases(): iterable
{
yield [
[
Expand Down
4 changes: 2 additions & 2 deletions tests/Model/NoDriverGalleryManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class NoDriverGalleryManagerTest extends TestCase
{
/**
* @dataProvider providerMethods
* @dataProvider provideExceptionCases
*
* @param mixed[] $arguments
*/
Expand All @@ -40,7 +40,7 @@ public function testIsInstanceOfGalleryManagerInterface(): void
/**
* @phpstan-return iterable<array{string, mixed[]}>
*/
public function providerMethods(): iterable
public function provideExceptionCases(): iterable
{
yield ['getClass', []];
yield ['findAll', []];
Expand Down
4 changes: 2 additions & 2 deletions tests/Model/NoDriverMediaManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class NoDriverMediaManagerTest extends TestCase
{
/**
* @dataProvider providerMethods
* @dataProvider provideExceptionCases
*
* @param mixed[] $arguments
*/
Expand All @@ -40,7 +40,7 @@ public function testIsInstanceOfMediaManagerInterface(): void
/**
* @phpstan-return iterable<array{string, mixed[]}>
*/
public function providerMethods(): iterable
public function provideExceptionCases(): iterable
{
yield ['getClass', []];
yield ['findAll', []];
Expand Down
4 changes: 2 additions & 2 deletions tests/Provider/DailyMotionProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function testTransformWithSig(): void
}

/**
* @dataProvider dataTransformWithUrl
* @dataProvider provideTransformWithUrlCases
*/
public function testTransformWithUrl(string $url): void
{
Expand Down Expand Up @@ -214,7 +214,7 @@ public function testTransformWithUrl(string $url): void
/**
* @phpstan-return iterable<array{string}>
*/
public function dataTransformWithUrl(): iterable
public function provideTransformWithUrlCases(): iterable
{
yield ['http://www.dailymotion.com/video/x9wjql_asdasdasdsa_asdsds'];
yield ['http://www.dailymotion.com/video/x9wjql'];
Expand Down
4 changes: 2 additions & 2 deletions tests/Provider/FileProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public function testDownload(): void
}

/**
* @dataProvider mediaProvider
* @dataProvider provideTransformCases
*
* @phpstan-param class-string $expected
*/
Expand All @@ -215,7 +215,7 @@ public function testTransform(string $expected, MediaInterface $media): void
/**
* @phpstan-return iterable<array{class-string, MediaInterface}>
*/
public function mediaProvider(): iterable
public function provideTransformCases(): iterable
{
$realPath = realpath(__DIR__.'/../Fixtures/file.txt');

Expand Down
4 changes: 2 additions & 2 deletions tests/Provider/VimeoProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function testTransformWithSig(): void
}

/**
* @dataProvider getTransformWithUrlMedia
* @dataProvider provideTransformWithUrlCases
*/
public function testTransformWithUrl(MediaInterface $media): void
{
Expand Down Expand Up @@ -211,7 +211,7 @@ public function testTransformWithUrl(MediaInterface $media): void
/**
* @phpstan-return iterable<array{MediaInterface}>
*/
public function getTransformWithUrlMedia(): iterable
public function provideTransformWithUrlCases(): iterable
{
$mediaWebsite = new Media();
$mediaWebsite->setContext('default');
Expand Down
4 changes: 2 additions & 2 deletions tests/Provider/YouTubeProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function testTransformWithSig(): void
}

/**
* @dataProvider getUrls
* @dataProvider provideTransformWithUrlCases
*/
public function testTransformWithUrl(string $url): void
{
Expand Down Expand Up @@ -217,7 +217,7 @@ public function testTransformWithUrl(string $url): void
/**
* @phpstan-return iterable<array{string}>
*/
public static function getUrls(): iterable
public static function provideTransformWithUrlCases(): iterable
{
yield ['BDYAbAtaDzA'];
yield ['http://www.youtube.com/watch?v=BDYAbAtaDzA&feature=feedrec_grec_index'];
Expand Down
12 changes: 6 additions & 6 deletions tests/Resizer/CropResizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function setUp(): void
}

/**
* @dataProvider getResizeProvider
* @dataProvider provideResizeCases
*/
public function testResize(
int $srcWidth,
Expand Down Expand Up @@ -113,7 +113,7 @@ public function testResize(
/**
* @phpstan-return iterable<array{int, int, int, int, int, int, int, int}>
*/
public function getResizeProvider(): iterable
public function provideResizeCases(): iterable
{
yield 'landscape: resize, no crop' => [800, 200, 400, 100, 400, 100, 0, 0];
yield 'landscape: resize, crop' => [800, 200, 600, 100, 600, 150, 600, 100];
Expand All @@ -134,7 +134,7 @@ public function getResizeProvider(): iterable
}

/**
* @dataProvider getResizeNoChangeProvider
* @dataProvider provideResizeNoChangeCases
*/
public function testResizeNoChange(
int $srcWidth,
Expand Down Expand Up @@ -178,7 +178,7 @@ public function testResizeNoChange(
/**
* @phpstan-return iterable<array{int, int, int, int}>
*/
public function getResizeNoChangeProvider(): iterable
public function provideResizeNoChangeCases(): iterable
{
yield 'landscape: match' => [800, 200, 800, 200];
yield 'landscape: small width' => [800, 100, 800, 200];
Expand All @@ -193,7 +193,7 @@ public function getResizeNoChangeProvider(): iterable
}

/**
* @dataProvider getBoxProvider
* @dataProvider provideGetBoxCases
*/
public function testGetBox(int $srcWidth, int $srcHeight, int $targetWidth, int $targetHeight, int $expectWidth, int $expectHeight): void
{
Expand Down Expand Up @@ -223,7 +223,7 @@ public function testGetBox(int $srcWidth, int $srcHeight, int $targetWidth, int
/**
* @phpstan-return iterable<array{int, int, int, int, int, int}>
*/
public function getBoxProvider(): iterable
public function provideGetBoxCases(): iterable
{
yield 'source = target' => [800, 800, 800, 800, 800, 800];

Expand Down
4 changes: 2 additions & 2 deletions tests/Resizer/SimpleResizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function testResize(): void
}

/**
* @dataProvider getBoxSettings
* @dataProvider provideGetBoxCases
*
* @param array<string, int|string|bool|array|null> $settings
*
Expand Down Expand Up @@ -149,7 +149,7 @@ public function testGetBox(int $mode, array $settings, Box $mediaSize, Box $resu
/**
* @phpstan-return iterable<array{int, FormatOptions, Box, Box}>
*/
public static function getBoxSettings(): iterable
public static function provideGetBoxCases(): iterable
{
yield [ManipulatorInterface::THUMBNAIL_INSET, [
'width' => 90,
Expand Down
4 changes: 2 additions & 2 deletions tests/Resizer/SquareResizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function testResizeWithNoWidth(): void
}

/**
* @dataProvider getBoxSettings
* @dataProvider provideGetBoxCases
*
* @param array<string, int|string|bool|array|null> $settings
*
Expand Down Expand Up @@ -78,7 +78,7 @@ public function testGetBox(array $settings, Box $mediaSize, Box $expected): void
/**
* @phpstan-return iterable<array{FormatOptions, Box, Box}>
*/
public static function getBoxSettings(): iterable
public static function provideGetBoxCases(): iterable
{
yield [[
'width' => 90,
Expand Down

0 comments on commit a14140e

Please sign in to comment.