summaryrefslogtreecommitdiff
path: root/modules/update/update.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/update/update.test')
-rw-r--r--modules/update/update.test14
1 files changed, 12 insertions, 2 deletions
diff --git a/modules/update/update.test b/modules/update/update.test
index 997650d73..c0f471a0a 100644
--- a/modules/update/update.test
+++ b/modules/update/update.test
@@ -32,9 +32,9 @@ class UpdateTestHelper extends DrupalWebTestCase {
*
* @see update_test_mock_page()
*/
- protected function refreshUpdateStatus($xml_map) {
+ protected function refreshUpdateStatus($xml_map, $url = 'update-test') {
// Tell update module to fetch from the URL provided by update_test module.
- variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE)));
+ variable_set('update_fetch_url', url($url, array('absolute' => TRUE)));
// Save the map for update_test_mock_page() to use.
variable_set('update_test_xml_map', $xml_map);
// Manually check the update status.
@@ -215,6 +215,16 @@ class UpdateCoreTestCase extends UpdateTestHelper {
$this->assertNoText(t('There is a security update available for your version of Drupal.'));
}
+ /**
+ * Tests the update module when the update server returns 503 (Service unavailable) errors.
+ */
+ function testServiceUnavailable() {
+ $this->refreshUpdateStatus(array(), '503-error');
+ // Ensure that no "Warning: SimpleXMLElement..." parse errors are found.
+ $this->assertNoText('SimpleXMLElement');
+ $this->assertUniqueText(t('Failed to get available update data for one project.'));
+ }
+
protected function setSystemInfo7_0() {
$setting = array(
'#all' => array(