From d6caf99c2e5259ddc3bc869ee60cc8b0ff0968ec Mon Sep 17 00:00:00 2001 From: marcelmanzel Date: Wed, 6 Dec 2023 09:21:48 +0100 Subject: [PATCH] OXDEV-7325: Correct test names and add type hints; Remove unnecessary usages; --- .../Infrastructure/ThemeSettingRepositoryGettersTest.php | 6 +++--- tests/Unit/UnitTestCase.php | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/Unit/Infrastructure/ThemeSettingRepositoryGettersTest.php b/tests/Unit/Infrastructure/ThemeSettingRepositoryGettersTest.php index d7e8a63..5c8c5a8 100644 --- a/tests/Unit/Infrastructure/ThemeSettingRepositoryGettersTest.php +++ b/tests/Unit/Infrastructure/ThemeSettingRepositoryGettersTest.php @@ -29,7 +29,7 @@ class ThemeSettingRepositoryGettersTest extends AbstractThemeSettingRepositoryTe * @dataProvider possibleGetCollectionValuesDataProvider * @dataProvider possibleGetAssocCollectionValuesDataProvider */ - public function testGetShopSetting($method, $type, $possibleValue, $expectedResult): void + public function testGetThemeSetting(string $method, string $type, mixed $possibleValue, mixed $expectedResult): void { $name = uniqid(); $sut = $this->getSut(methods: ['getSettingValue']); @@ -45,10 +45,10 @@ public function testGetShopSetting($method, $type, $possibleValue, $expectedResu /** * @dataProvider wrongSettingsValueDataProvider */ - public function testGetShopSettingWrongData( + public function testGetThemeSettingWrongData( string $method, string $type, - $value, + mixed $value, string $expectedException ): void { $name = uniqid(); diff --git a/tests/Unit/UnitTestCase.php b/tests/Unit/UnitTestCase.php index 293f19a..26fdd3e 100644 --- a/tests/Unit/UnitTestCase.php +++ b/tests/Unit/UnitTestCase.php @@ -10,15 +10,10 @@ namespace OxidEsales\GraphQL\ConfigurationAccess\Tests\Unit; use OxidEsales\EshopCommunity\Internal\Transition\Utility\BasicContextInterface; -use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\BooleanSetting; -use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\FloatSetting; -use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\IntegerSetting; use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\SettingType; -use OxidEsales\GraphQL\ConfigurationAccess\Setting\DataType\StringSetting; use OxidEsales\GraphQL\ConfigurationAccess\Setting\Enum\FieldType; use OxidEsales\GraphQL\ConfigurationAccess\Setting\Service\CollectionEncodingServiceInterface; use PHPUnit\Framework\TestCase; -use TheCodingMachine\GraphQLite\Types\ID; class UnitTestCase extends TestCase {