Skip to content

Commit

Permalink
Remove some 8.x verstiges.
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman committed Jan 17, 2022
1 parent 28ba054 commit 5762a37
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
@@ -1,7 +1,7 @@
name: Drush empty module
description: 'Drush empty module'
core: 8.x
core_version_requirement: ^8 || ^9 || ^10
core_version_requirement: ^9 || ^10
type: module
# Require for the sake of tests - simulate what packaging would do.
project: drush_empty_module
5 changes: 2 additions & 3 deletions tests/unish/CreateEntityType.php
Expand Up @@ -15,15 +15,14 @@ public static function createContentEntity($testCase): void
'name' => 'Unish Article',
'machine_name' => 'unish_article',
'description' => 'A test module',
// See https://www.drupal.org/project/drupal/issues/3096609.
'package' => 'Testing',
'package' => 'Unish',
'dependencies' => 'drupal:text',
];
$testCase->drush('generate', ['module'], ['verbose' => null, 'answer' => $answers, 'destination' => Path::join($testCase->webroot(), 'modules/contrib')], null, null, $testCase::EXIT_SUCCESS, null, ['SHELL_INTERACTIVE' => 1]);
// Currently needed for Drush 10.x tests. Harmless on other versions.
$path = Path::join($testCase->webroot(), 'modules/contrib/unish_article/unish_article.info.yml');
$contents = file_get_contents($path);
file_put_contents($path, str_replace('^8 || ^9', '^8 || ^9 || ^10', $contents));
file_put_contents($path, str_replace('^8 || ^9', '^9 || ^10', $contents));


// Create a content entity type and enable its module.
Expand Down
2 changes: 1 addition & 1 deletion tests/unish/TestModuleHelperTrait.php
Expand Up @@ -33,7 +33,7 @@ public function setupModulesForTests(array $modules, $sourcePath)
$info_path = $targetDir . "/$module.info.yml";
$module_info = file_get_contents($info_path);
if (strpos($module_info, 'core_version_requirement') === false) {
$module_info = "core_version_requirement: ^8 || ^9 || ^10\n$module_info";
$module_info = "core_version_requirement: ^9 || ^10\n$module_info";
file_put_contents($info_path, $module_info);
}
}
Expand Down

0 comments on commit 5762a37

Please sign in to comment.