-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OXDEV-8489: Add a few argument checks to tests and integration test
- Loading branch information
1 parent
fb30707
commit 574c975
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © OXID eSales AG. All rights reserved. | ||
* See LICENSE file for license details. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OxidEsales\GraphQL\ConfigurationAccess\Tests\Integration\Infrastructure; | ||
|
||
use OxidEsales\EshopCommunity\Internal\Framework\DIContainer\Dao\ProjectYamlDaoInterface; | ||
use OxidEsales\EshopCommunity\Tests\Integration\IntegrationTestCase; | ||
use OxidEsales\GraphQL\ConfigurationAccess\Module\Service\ModuleBlocklistService; | ||
use Symfony\Component\Yaml\Yaml; | ||
|
||
class ModuleBlockListServiceTest extends IntegrationTestCase | ||
{ | ||
public function testLoadYamlList(): void | ||
{ | ||
$moduleServices = Yaml::parseFile(dirname(__FILE__) . '/../../../src/Module/services.yaml'); | ||
$blockedListYamlPathParameterName = 'oxidesales.graphqlconfigurationaccess.modules_block_list_path'; | ||
$blockedListYamlPath = $moduleServices['parameters'][$blockedListYamlPathParameterName]; | ||
|
||
$sut = new ModuleBlocklistService( | ||
moduleBlocklistPath: $blockedListYamlPath, | ||
projectYamlDao: $this->get(ProjectYamlDaoInterface::class) | ||
); | ||
|
||
$this->assertTrue($sut->isModuleBlocked('oe_graphql_base')); | ||
$this->assertTrue($sut->isModuleBlocked('oe_graphql_configuration_access')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters