Commit 0f8cedfd authored by webchick's avatar webchick

Issue #1879732 by vijaycs85, Gábor Hojtsy: Fixed Language-related modules not...

Issue #1879732 by vijaycs85, Gábor Hojtsy: Fixed Language-related modules not listed on available updates page.
parent bd301081
......@@ -17,7 +17,7 @@ class UpdateCoreTest extends UpdateTestBase {
*
* @var array
*/
public static $modules = array('update_test', 'update');
public static $modules = array('update_test', 'update', 'language');
public static function getInfo() {
return array(
......@@ -33,6 +33,7 @@ function setUp() {
$this->drupalLogin($admin_user);
}
/**
* Tests the Update Manager module when no updates are available.
*/
......@@ -217,6 +218,19 @@ function testFetchTasks() {
$this->assertEqual($queue->numberOfItems(), 2, 'Queue contains two items');
}
/**
* Checks language module in core package at admin/reports/updates.
*/
function testLanguageModuleUpdate() {
$this->setSystemInfo7_0();
// Instead of using refreshUpdateStatus(), set these manually.
config('update.settings')->set('fetch.url', url('update-test', array('absolute' => TRUE)))->save();
config('update_test.settings')->set('xml_map', array('drupal' => '1'))->save();
$this->drupalGet('admin/reports/updates');
$this->assertText(t('Language'));
}
/**
* Sets the version to 7.0 when no project-specific mapping is defined.
*/
......
......@@ -254,7 +254,7 @@ function update_get_project_name($file) {
if (isset($file->info['project'])) {
$project_name = $file->info['project'];
}
elseif (isset($file->info['package']) && (strpos($file->info['package'], 'Core') === 0)) {
elseif (isset($file->filename) && (strpos($file->filename, 'core/modules') === 0)) {
$project_name = 'drupal';
}
return $project_name;
......
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