Skip to content

Commit 515340d

Browse files
author
Willem Wigman
committed
Add module registration test. Bump version.
1 parent dc4f099 commit 515340d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "integer-net/magento2-global-custom-layout",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "Module for Magento 2 that allows you to add global layout update files to be selected from admin, by using '0' instead of an entity_id",
55
"authors": [
66
{

tests/Integration/ModuleTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
namespace IntegerNet\GlobalCustomLayout\Test\Integration;
55

66
use Magento\Framework\App\ObjectManager;
7+
use Magento\Framework\Component\ComponentRegistrar;
78
use Magento\Framework\Module\ModuleList;
89
use PHPUnit\Framework\TestCase;
910

@@ -21,6 +22,13 @@ protected function setUp()
2122
$this->objectManager = ObjectManager::getInstance();
2223
}
2324

25+
public function testModuleIsRegistered()
26+
{
27+
$registrar = new ComponentRegistrar();
28+
$paths = $registrar->getPaths(ComponentRegistrar::MODULE);
29+
$this->assertArrayHasKey(self::MODULE_NAME, $paths);
30+
}
31+
2432
public function testModuleIsActive()
2533
{
2634
/** @var ModuleList $moduleList */
@@ -30,4 +38,4 @@ public function testModuleIsActive()
3038
sprintf('The module %s should be enabled', self::MODULE_NAME)
3139
);
3240
}
33-
}
41+
}

0 commit comments

Comments
 (0)