From 515340dfd3116741b422af07e6ac92943d826aef Mon Sep 17 00:00:00 2001 From: Willem Wigman Date: Fri, 8 May 2020 14:51:19 +0200 Subject: [PATCH 1/3] Add module registration test. Bump version. --- composer.json | 2 +- tests/Integration/ModuleTest.php | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index acc35e5..b268128 100755 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "integer-net/magento2-global-custom-layout", - "version": "1.1.0", + "version": "1.1.1", "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", "authors": [ { diff --git a/tests/Integration/ModuleTest.php b/tests/Integration/ModuleTest.php index c068ca6..2c4a739 100755 --- a/tests/Integration/ModuleTest.php +++ b/tests/Integration/ModuleTest.php @@ -4,6 +4,7 @@ namespace IntegerNet\GlobalCustomLayout\Test\Integration; use Magento\Framework\App\ObjectManager; +use Magento\Framework\Component\ComponentRegistrar; use Magento\Framework\Module\ModuleList; use PHPUnit\Framework\TestCase; @@ -21,6 +22,13 @@ protected function setUp() $this->objectManager = ObjectManager::getInstance(); } + public function testModuleIsRegistered() + { + $registrar = new ComponentRegistrar(); + $paths = $registrar->getPaths(ComponentRegistrar::MODULE); + $this->assertArrayHasKey(self::MODULE_NAME, $paths); + } + public function testModuleIsActive() { /** @var ModuleList $moduleList */ @@ -30,4 +38,4 @@ public function testModuleIsActive() sprintf('The module %s should be enabled', self::MODULE_NAME) ); } -} \ No newline at end of file +} From 1f3c3e18a5b6af0e6ca638b3223e7764278feedb Mon Sep 17 00:00:00 2001 From: Willem Wigman Date: Fri, 8 May 2020 15:01:28 +0200 Subject: [PATCH 2/3] Revert registration.php exclusion --- tests/Integration/phpunit.xml.dist | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/Integration/phpunit.xml.dist b/tests/Integration/phpunit.xml.dist index 87e9d8f..157159f 100755 --- a/tests/Integration/phpunit.xml.dist +++ b/tests/Integration/phpunit.xml.dist @@ -22,9 +22,6 @@ ../../../vendor/integer-net/*/src - - ../../../vendor/integer-net/*/src/registration.php - From 4d9f37ae87977e2b3ad4d383d82548f73db0945e Mon Sep 17 00:00:00 2001 From: Willem Wigman Date: Fri, 8 May 2020 15:04:15 +0200 Subject: [PATCH 3/3] update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef29b2c..56eb819 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,3 +13,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Adds frontend test coverage for global custom layout updates - Fixes [#7](https://github.com/integer-net/magento2-global-custom-layout/issues/7) where layout handles were not merged in Product and Page Plugins' `afterFetchAvailableFiles()` method. + +## 1.1.1 - 2020-05-08 +### Added +- Adds module registration test (registration.php coverage) +- Adds travis config for tags/releases