1 installer.test | protected InstallerBrowserAdministrationTestCase::getProjectData($test_module) |
Get the recommended version for a given project.
Parameters
$test_module: The test module.
Return value
The recommended version.:
File
- core/
modules/ installer/ tests/ installer.test, line 177
Class
- InstallerBrowserAdministrationTestCase
- Administration tests for Project Browser.
Code
protected function getProjectData($test_module) {
module_load_include('inc', 'installer', 'installer.browser');
module_load_include('inc', 'update', 'update.compare');
// Build the filters.
$backdrop_version = explode('.', BACKDROP_CORE_COMPATIBILITY);
$filters = array(
'version' => $backdrop_version[0],
'type' => 'module',
);
$results = installer_browser_fetch_results($filters);
$release_data = installer_browser_get_project_release_data($results['projects'][$test_module]);
$project_data = array(
'existing_major' => 0,
'existing_version' => 0,
'install_type' => '',
);
update_calculate_project_update_status($project_data, $release_data);
return $project_data;
}