From bc9a742f68a02e69a51aa5aa0b6544294697f433 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Tue, 13 Oct 2009 08:02:49 +0000 Subject: #597390 by Dave Reid and dww: Fixed PHP notices on non-existant projects when parsing update XML. --- modules/update/tests/aaa_update_test.no-releases.xml | 2 ++ modules/update/tests/update_test.module | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 modules/update/tests/aaa_update_test.no-releases.xml (limited to 'modules/update/tests') diff --git a/modules/update/tests/aaa_update_test.no-releases.xml b/modules/update/tests/aaa_update_test.no-releases.xml new file mode 100644 index 000000000..e266d4992 --- /dev/null +++ b/modules/update/tests/aaa_update_test.no-releases.xml @@ -0,0 +1,2 @@ + +No release history was found for the requested project (aaa_update_test). diff --git a/modules/update/tests/update_test.module b/modules/update/tests/update_test.module index f95a5cb9a..4ae4bccf9 100644 --- a/modules/update/tests/update_test.module +++ b/modules/update/tests/update_test.module @@ -62,7 +62,12 @@ function update_test_mock_page($project_name) { $availability_scenario = $xml_map['#all']; } else { - return FALSE; + // The test didn't specify (for example, the webroot has other modules and + // themes installed but they're disabled by the version of the site + // running the test. So, we default to a file we know won't exist, so at + // least we'll get an empty page from readfile instead of a bunch of + // Drupal page output. + $availability_scenario = '#broken#'; } $path = drupal_get_path('module', 'update_test'); -- cgit v1.2.3