Skip to content

Commit b8b6642

Browse files
authored
Merge pull request #136 from mglaman/gh-123
Weight all test modules higher
2 parents cec4fdd + 2d31a27 commit b8b6642

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/php.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ jobs:
114114
cd ~/drupal
115115
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/token drupal/blazy
116116
./vendor/bin/phpstan analyze web/modules/contrib/blazy --no-progress || if (($? == 255)); then false; else true; fi
117+
COMPOSER_MEMORY_LIMIT=-1 composer remove drupal/token drupal/blazy
118+
- name: 'Check "Cannot redeclare video_embed_media_media_bundle_insert()"'
119+
run: |
120+
cd ~/drupal
121+
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/video_embed_field drupal/slick
122+
./vendor/bin/phpstan analyze web/modules/contrib --no-progress || if (($? == 255)); then false; else true; fi
123+
COMPOSER_MEMORY_LIMIT=-1 composer remove drupal/video_embed_field drupal/slick
117124
build_integration_no_phpunit:
118125
continue-on-error: ${{ matrix.experimental }}
119126
runs-on: "ubuntu-latest"

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ script:
3333
- COMPOSER_MEMORY_LIMIT=-1 composer require drupal/token drupal/blazy
3434
- ./vendor/bin/phpstan analyze web/modules/contrib/blazy --no-progress || if (($? == 255)); then false; else true; fi
3535

36+
# Check " Cannot redeclare video_embed_media_media_bundle_insert() due to slick_test.module"
37+
- composer require drupal/video_embed_field drupal/slick
38+
- ./vendor/bin/phpstan analyze web/modules/contrib/slick --no-progress || if (($? == 255)); then false; else true; fi
39+
3640
cache:
3741
directories:
3842
- $HOME/.composer/cache

src/Drupal/DrupalAutoloader.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ public function register(Container $container): void
9191

9292
$this->moduleData = array_merge($this->extensionDiscovery->scan('module'), $profiles);
9393
usort($this->moduleData, static function (Extension $a, Extension $b) {
94-
// blazy_test causes errors, ensure it is loaded last.
95-
return $a->getName() === 'blazy_test' ? 10 : 0;
94+
return strpos($a->getName(), '_test') !== false ? 10 : 0;
9695
});
9796
$this->themeData = $this->extensionDiscovery->scan('theme');
9897
$this->addTestNamespaces();

0 commit comments

Comments
 (0)