From cdfc17f594d3b55587611d29e50ca52373f3c82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Van=C3=AD=C4=8Dek?= Date: Fri, 22 Nov 2024 14:53:53 +0100 Subject: [PATCH] chore(job-configuration): Use "TestCase" naming for abstract test classes Since PHPUnit 10, the abstract classes with Test suffix are deprecated, see https://github.com/sebastianbergmann/phpunit/issues/5132. --- .../{BaseDataLoaderTest.php => BaseDataLoaderTestCase.php} | 2 +- tests/Mapping/InputDataLoader/ABSInputDataLoaderTest.php | 2 +- ...nputDataLoaderTest.php => BaseInputDataLoaderTestCase.php} | 4 ++-- tests/Mapping/InputDataLoader/BigQueryInputDataLoaderTest.php | 2 +- tests/Mapping/InputDataLoader/GCSInputDataLoaderTest.php | 2 +- tests/Mapping/InputDataLoader/InputDataLoaderTest.php | 2 +- tests/Mapping/InputDataLoader/S3InputDataLoaderTest.php | 2 +- .../OutputDataLoader/ABSPersistentOutputDataLoaderTest.php | 2 +- ...putDataLoaderTest.php => BaseOutputDataLoaderTestCase.php} | 4 ++-- .../Mapping/OutputDataLoader/OutputDataLoaderMetadataTest.php | 2 +- tests/Mapping/OutputDataLoader/OutputDataLoaderTest.php | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) rename tests/Mapping/{BaseDataLoaderTest.php => BaseDataLoaderTestCase.php} (99%) rename tests/Mapping/InputDataLoader/{BaseInputDataLoaderTest.php => BaseInputDataLoaderTestCase.php} (96%) rename tests/Mapping/OutputDataLoader/{BaseOutputDataLoaderTest.php => BaseOutputDataLoaderTestCase.php} (96%) diff --git a/tests/Mapping/BaseDataLoaderTest.php b/tests/Mapping/BaseDataLoaderTestCase.php similarity index 99% rename from tests/Mapping/BaseDataLoaderTest.php rename to tests/Mapping/BaseDataLoaderTestCase.php index 7f12bdd..4ab9a18 100644 --- a/tests/Mapping/BaseDataLoaderTest.php +++ b/tests/Mapping/BaseDataLoaderTestCase.php @@ -19,7 +19,7 @@ use RuntimeException; use Symfony\Component\Filesystem\Filesystem; -abstract class BaseDataLoaderTest extends TestCase +abstract class BaseDataLoaderTestCase extends TestCase { private const DEFAULT_COMPONENT_STAGING_STORAGE_TYPE = 'local'; protected const COMPONENT_ID = 'docker-demo'; diff --git a/tests/Mapping/InputDataLoader/ABSInputDataLoaderTest.php b/tests/Mapping/InputDataLoader/ABSInputDataLoaderTest.php index 905c965..22ec39a 100644 --- a/tests/Mapping/InputDataLoader/ABSInputDataLoaderTest.php +++ b/tests/Mapping/InputDataLoader/ABSInputDataLoaderTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; -class ABSInputDataLoaderTest extends BaseInputDataLoaderTest +class ABSInputDataLoaderTest extends BaseInputDataLoaderTestCase { protected const DEFAULT_PROJECT = 'azure'; diff --git a/tests/Mapping/InputDataLoader/BaseInputDataLoaderTest.php b/tests/Mapping/InputDataLoader/BaseInputDataLoaderTestCase.php similarity index 96% rename from tests/Mapping/InputDataLoader/BaseInputDataLoaderTest.php rename to tests/Mapping/InputDataLoader/BaseInputDataLoaderTestCase.php index 5a48b75..7798d78 100644 --- a/tests/Mapping/InputDataLoader/BaseInputDataLoaderTest.php +++ b/tests/Mapping/InputDataLoader/BaseInputDataLoaderTestCase.php @@ -7,7 +7,7 @@ use Keboola\InputMapping\Staging\StrategyFactory; use Keboola\JobQueue\JobConfiguration\Mapping\InputDataLoader; use Keboola\JobQueue\JobConfiguration\Mapping\WorkspaceProviderFactoryFactory; -use Keboola\JobQueue\JobConfiguration\Tests\Mapping\BaseDataLoaderTest; +use Keboola\JobQueue\JobConfiguration\Tests\Mapping\BaseDataLoaderTestCase; use Keboola\StagingProvider\InputProviderInitializer; use Keboola\StorageApi\Components; use Keboola\StorageApi\Workspaces; @@ -15,7 +15,7 @@ use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; -abstract class BaseInputDataLoaderTest extends BaseDataLoaderTest +abstract class BaseInputDataLoaderTestCase extends BaseDataLoaderTestCase { protected function getInputDataLoader( ?ClientWrapper $clientWrapper = null, diff --git a/tests/Mapping/InputDataLoader/BigQueryInputDataLoaderTest.php b/tests/Mapping/InputDataLoader/BigQueryInputDataLoaderTest.php index c368546..7c92e86 100644 --- a/tests/Mapping/InputDataLoader/BigQueryInputDataLoaderTest.php +++ b/tests/Mapping/InputDataLoader/BigQueryInputDataLoaderTest.php @@ -19,7 +19,7 @@ use Keboola\StorageApi\Workspaces; use Symfony\Component\Filesystem\Filesystem; -class BigQueryInputDataLoaderTest extends BaseInputDataLoaderTest +class BigQueryInputDataLoaderTest extends BaseInputDataLoaderTestCase { protected const COMPONENT_ID = 'keboola.runner-workspace-bigquery-test'; protected const RESOURCE_SUFFIX = '-gcp-bq'; diff --git a/tests/Mapping/InputDataLoader/GCSInputDataLoaderTest.php b/tests/Mapping/InputDataLoader/GCSInputDataLoaderTest.php index 1b05411..6bb4dc5 100644 --- a/tests/Mapping/InputDataLoader/GCSInputDataLoaderTest.php +++ b/tests/Mapping/InputDataLoader/GCSInputDataLoaderTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; -class GCSInputDataLoaderTest extends BaseInputDataLoaderTest +class GCSInputDataLoaderTest extends BaseInputDataLoaderTestCase { protected const RESOURCE_SUFFIX = '-gcp-gcs'; protected const DEFAULT_PROJECT = 'gcp'; diff --git a/tests/Mapping/InputDataLoader/InputDataLoaderTest.php b/tests/Mapping/InputDataLoader/InputDataLoaderTest.php index 3b864da..82c615b 100644 --- a/tests/Mapping/InputDataLoader/InputDataLoaderTest.php +++ b/tests/Mapping/InputDataLoader/InputDataLoaderTest.php @@ -17,7 +17,7 @@ use Keboola\StorageApi\Metadata; use Symfony\Component\Filesystem\Filesystem; -class InputDataLoaderTest extends BaseInputDataLoaderTest +class InputDataLoaderTest extends BaseInputDataLoaderTestCase { protected const RESOURCE_SUFFIX = '-input'; diff --git a/tests/Mapping/InputDataLoader/S3InputDataLoaderTest.php b/tests/Mapping/InputDataLoader/S3InputDataLoaderTest.php index 43d741b..f9a4c14 100644 --- a/tests/Mapping/InputDataLoader/S3InputDataLoaderTest.php +++ b/tests/Mapping/InputDataLoader/S3InputDataLoaderTest.php @@ -13,7 +13,7 @@ use Keboola\JobQueue\JobConfiguration\JobDefinition\State\State; use Symfony\Component\Filesystem\Filesystem; -class S3InputDataLoaderTest extends BaseInputDataLoaderTest +class S3InputDataLoaderTest extends BaseInputDataLoaderTestCase { protected const RESOURCE_SUFFIX = '-s3'; diff --git a/tests/Mapping/OutputDataLoader/ABSPersistentOutputDataLoaderTest.php b/tests/Mapping/OutputDataLoader/ABSPersistentOutputDataLoaderTest.php index bf80943..2ba3ea8 100644 --- a/tests/Mapping/OutputDataLoader/ABSPersistentOutputDataLoaderTest.php +++ b/tests/Mapping/OutputDataLoader/ABSPersistentOutputDataLoaderTest.php @@ -19,7 +19,7 @@ use Keboola\StorageApiBranch\ClientWrapper; use Keboola\StorageApiBranch\StorageApiToken; -class ABSPersistentOutputDataLoaderTest extends BaseOutputDataLoaderTest +class ABSPersistentOutputDataLoaderTest extends BaseOutputDataLoaderTestCase { protected const COMPONENT_ID = 'keboola.runner-config-test'; protected const DEFAULT_PROJECT = 'azure'; diff --git a/tests/Mapping/OutputDataLoader/BaseOutputDataLoaderTest.php b/tests/Mapping/OutputDataLoader/BaseOutputDataLoaderTestCase.php similarity index 96% rename from tests/Mapping/OutputDataLoader/BaseOutputDataLoaderTest.php rename to tests/Mapping/OutputDataLoader/BaseOutputDataLoaderTestCase.php index 90a054b..d23b7cf 100644 --- a/tests/Mapping/OutputDataLoader/BaseOutputDataLoaderTest.php +++ b/tests/Mapping/OutputDataLoader/BaseOutputDataLoaderTestCase.php @@ -6,7 +6,7 @@ use Keboola\JobQueue\JobConfiguration\Mapping\OutputDataLoader; use Keboola\JobQueue\JobConfiguration\Mapping\WorkspaceProviderFactoryFactory; -use Keboola\JobQueue\JobConfiguration\Tests\Mapping\BaseDataLoaderTest; +use Keboola\JobQueue\JobConfiguration\Tests\Mapping\BaseDataLoaderTestCase; use Keboola\OutputMapping\Staging\StrategyFactory as OutputStrategyFactory; use Keboola\StagingProvider\OutputProviderInitializer; use Keboola\StorageApi\Components; @@ -15,7 +15,7 @@ use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; -abstract class BaseOutputDataLoaderTest extends BaseDataLoaderTest +abstract class BaseOutputDataLoaderTestCase extends BaseDataLoaderTestCase { protected function getOutputDataLoader( ?ClientWrapper $clientWrapper = null, diff --git a/tests/Mapping/OutputDataLoader/OutputDataLoaderMetadataTest.php b/tests/Mapping/OutputDataLoader/OutputDataLoaderMetadataTest.php index 87b6d70..410c938 100644 --- a/tests/Mapping/OutputDataLoader/OutputDataLoaderMetadataTest.php +++ b/tests/Mapping/OutputDataLoader/OutputDataLoaderMetadataTest.php @@ -17,7 +17,7 @@ use Keboola\StorageApiBranch\Factory\ClientOptions; use Symfony\Component\Filesystem\Filesystem; -class OutputDataLoaderMetadataTest extends BaseOutputDataLoaderTest +class OutputDataLoaderMetadataTest extends BaseOutputDataLoaderTestCase { private Metadata $metadata; diff --git a/tests/Mapping/OutputDataLoader/OutputDataLoaderTest.php b/tests/Mapping/OutputDataLoader/OutputDataLoaderTest.php index 2c901b3..5ed5c83 100644 --- a/tests/Mapping/OutputDataLoader/OutputDataLoaderTest.php +++ b/tests/Mapping/OutputDataLoader/OutputDataLoaderTest.php @@ -33,7 +33,7 @@ use ReflectionClass; use Symfony\Component\Filesystem\Filesystem; -class OutputDataLoaderTest extends BaseOutputDataLoaderTest +class OutputDataLoaderTest extends BaseOutputDataLoaderTestCase { public function testExecutorDefaultBucket(): void {