Commit 9a7b71ad authored by alexpott's avatar alexpott

Issue #2409515 by joelpittet, lauriii: Updater::findInfoFile() lacks test coverage

parent cdd12a90
......@@ -10,6 +10,7 @@
use Drupal\simpletest\KernelTestBase;
use Drupal\Core\Extension\InfoParser;
use Drupal\Core\Extension\InfoParserException;
use Drupal\Core\Updater\Updater;
/**
* Tests InfoParser class and exception.
......@@ -84,4 +85,17 @@ public function testInfoParser() {
$this->assertEqual($info_values['double_colon'], 'dummyClassName::', 'Value containing double-colon was parsed correctly.', 'System');
}
/**
* Tests project and child project showing correct title.
*
* @see https://drupal.org/node/2409515
*/
public function testGetProjectTitleWithChild() {
// Get the project title from it's directory. If it can't find the title
// it will choose the first project title in the directory.
$directory = \Drupal::root() . '/core/modules/system/tests/modules/module_handler_test_multiple';
$title = Updater::getProjectTitle($directory);
$this->assertEqual('module handler test multiple', $title);
}
}
name: module handler test multiple
type: module
description: Test module used to test adding modules with child module.
package: Testing
version: VERSION
core: 8.x
hidden: true
name: module handler test multiple child
type: module
description: Child of test module used to test adding modules with child module.
package: Testing
version: VERSION
core: 8.x
hidden: true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment