Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class ModuleTest extends TestCase |
||
12 | { |
||
13 | private const MODULE_NAME = 'IntegerNet_GlobalCustomLayout'; |
||
14 | |||
15 | /** |
||
16 | * @var ObjectManager |
||
17 | */ |
||
18 | private $objectManager; |
||
19 | |||
20 | protected function setUp(): void |
||
21 | { |
||
22 | $this->objectManager = ObjectManager::getInstance(); |
||
23 | } |
||
24 | |||
25 | public function testModuleIsRegistered() |
||
26 | { |
||
27 | $registrar = new ComponentRegistrar(); |
||
28 | $paths = $registrar->getPaths(ComponentRegistrar::MODULE); |
||
29 | $this->assertArrayHasKey(self::MODULE_NAME, $paths); |
||
30 | } |
||
31 | |||
32 | public function testModuleIsActive() |
||
33 | { |
||
34 | /** @var ModuleList $moduleList */ |
||
35 | $moduleList = $this->objectManager->create(ModuleList::class); |
||
36 | $this->assertTrue( |
||
37 | $moduleList->has(self::MODULE_NAME), |
||
38 | sprintf('The module %s should be enabled', self::MODULE_NAME) |
||
39 | ); |
||
42 |