Skip to content

Commit

Permalink
OXDEV-8215: Remove ComponentFiltersInterface; Add missing services;
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelOxid committed Aug 7, 2024
1 parent 2ca2426 commit 854121c
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Module/Controller/ModuleListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
#[Query]
#[Logged]
#[Right('LIST_MODULES')]
public function modulesList(?ComponentFiltersInterface $filters): array
public function modulesList(?ComponentFilters $filters): array
{
return $this->moduleListService->getModuleList($filters ?? new ComponentFilters());
}
Expand Down
3 changes: 0 additions & 3 deletions src/Module/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ services:
OxidEsales\GraphQL\ConfigurationAccess\Module\Service\ModuleSettingServiceInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Module\Service\ModuleSettingService

OxidEsales\GraphQL\ConfigurationAccess\Module\Service\ModuleFilterServiceInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Module\Service\ModuleFilterService

OxidEsales\GraphQL\ConfigurationAccess\Module\DataType\ModuleDataTypeFactoryInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Module\DataType\ModuleDataTypeFactory

Expand Down
5 changes: 4 additions & 1 deletion src/Shared/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ services:
OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\CollectionEncodingServiceInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\JsonCollectionEncodingService

OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\LanguageServiceInnterface:
OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\LanguageServiceInterface:
class: \OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\LanguageService

OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\ComponentFilterServiceInterface:
class: \OxidEsales\GraphQL\ConfigurationAccess\Shared\Service\ComponentFilterService
2 changes: 1 addition & 1 deletion src/Theme/Controller/ThemeListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(
#[Query]
#[Logged]
#[Right('LIST_THEMES')]
public function themesList(?ComponentFiltersInterface $filters): array
public function themesList(?ComponentFilters $filters): array
{
return $this->themeListService->getThemeList($filters ?? new ComponentFilters());
}
Expand Down
3 changes: 0 additions & 3 deletions src/Theme/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ services:
OxidEsales\GraphQL\ConfigurationAccess\Theme\DataType\ThemeDataTypeFactoryInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Theme\DataType\ThemeDataTypeFactory

OxidEsales\GraphQL\ConfigurationAccess\Theme\Service\ThemeFilterServiceInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Theme\Service\ThemeFilterService

OxidEsales\GraphQL\ConfigurationAccess\Theme\Service\ThemeListServiceInterface:
class: OxidEsales\GraphQL\ConfigurationAccess\Theme\Service\ThemeListService

5 changes: 2 additions & 3 deletions tests/Codeception/Acceptance/Module/ModuleListCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@

namespace OxidEsales\GraphQL\ConfigurationAccess\Tests\Codeception\Acceptance\Module;

use OxidEsales\GraphQL\ConfigurationAccess\Tests\Codeception\Acceptance\BaseCest;
use OxidEsales\GraphQL\ConfigurationAccess\Tests\Codeception\AcceptanceTester;

use function PHPUnit\Framework\assertCount;

/**
* @group module_list
* @group oe_graphql_configuration_access
*/
final class ModuleListCest extends ModuleSettingBaseCest
final class ModuleListCest extends BaseCest
{
public function testModuleListAuthorized(AcceptanceTester $I): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Codeception/Acceptance/Theme/ThemeListCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private function runThemeListQuery(AcceptanceTester $I): array
filters: null
) {
title
identifier
id
version
description
active
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Module/Controller/ModuleListControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ModuleListControllerTest extends UnitTestCase
{
public function testModulesListWithFilters(): void
{
$filtersStub = $this->createStub(ComponentFiltersInterface::class);
$filtersStub = $this->createStub(ComponentFilters::class);
$moduleStub1 = $this->createStub(ModuleDataTypeInterface::class);
$moduleStub2 = $this->createStub(ModuleDataTypeInterface::class);
$filteredModules = [$moduleStub1, $moduleStub2];
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Theme/Controller/ThemeListControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ThemeListControllerTest extends TestCase
public function testThemesListWithFilter(): void
{
$theme = $this->createStub(ThemeDataTypeInterface::class);
$themeFilters = $this->createStub(ComponentFiltersInterface::class);
$themeFilters = $this->createStub(ComponentFilters::class);

$themeListServiceMock = $this->createMock(ThemeListServiceInterface::class);
$themeListServiceMock->expects($this->once())
Expand Down

0 comments on commit 854121c

Please sign in to comment.