Skip to content

Commit

Permalink
OXDEV-8215: Rename modulesList query to modules
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelOxid committed Aug 8, 2024
1 parent d35848b commit 916fed0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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(?ComponentFilters $filters): array
public function modules(?ComponentFilters $filters): array
{
return $this->moduleListService->getModuleList($filters ?? new ComponentFilters());
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Codeception/Acceptance/Module/ModuleListCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function runModuleListQuery(AcceptanceTester $I): array
{
$I->sendGQLQuery(
'query modulesList {
modulesList(
modules(
filters: {
title: {
contains: "' . self::TEST_MODULE_TITLE . '"
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Module/Controller/ModuleListControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testModulesListWithFilters(): void
->willReturn($filteredModules);

$sut = new ModuleListController($moduleListServiceMock);
$actualModules = $sut->modulesList($filtersStub);
$actualModules = $sut->modules($filtersStub);

$this->assertSame($filteredModules, $actualModules);
}
Expand All @@ -50,7 +50,7 @@ public function testModulesListWithoutFilters(): void
->willReturn([$moduleStub]);

$sut = new ModuleListController($moduleListServiceSpy);
$resultModuleList = $sut->modulesList(null);
$resultModuleList = $sut->modules(null);

$this->assertSame($resultModuleList, [$moduleStub]);
}
Expand Down

0 comments on commit 916fed0

Please sign in to comment.