diff options
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 16 | ||||
-rw-r--r-- | modules/system/system.install | 16 |
2 files changed, 17 insertions, 15 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 0c832e53b..3232c9df6 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -1430,10 +1430,10 @@ class DrupalWebTestCase extends DrupalTestCase { '!method' => !empty($curl_options[CURLOPT_NOBODY]) ? 'HEAD' : (empty($curl_options[CURLOPT_POSTFIELDS]) ? 'GET' : 'POST'), '@url' => isset($original_url) ? $original_url : $url, '@status' => $status, - '!length' => format_size(strlen($this->content)) + '!length' => format_size(strlen($this->drupalGetContent())) ); $message = t('!method @url returned @status (!length).', $message_vars); - $this->assertTrue($this->content !== FALSE, $message, t('Browser')); + $this->assertTrue($this->drupalGetContent() !== FALSE, $message, t('Browser')); return $this->drupalGetContent(); } @@ -1498,7 +1498,7 @@ class DrupalWebTestCase extends DrupalTestCase { if (!$this->elements) { // DOM can load HTML soup. But, HTML soup can throw warnings, suppress // them. - @$htmlDom = DOMDocument::loadHTML($this->content); + @$htmlDom = DOMDocument::loadHTML($this->drupalGetContent()); if ($htmlDom) { $this->pass(t('Valid HTML found on "@path"', array('@path' => $this->getUrl())), t('Browser')); // It's much easier to work with simplexml than DOM, luckily enough @@ -1731,7 +1731,7 @@ class DrupalWebTestCase extends DrupalTestCase { if (isset($path)) { $this->drupalGet($path, $options); } - $content = $this->content; + $content = $this->drupalGetContent(); $return = drupal_json_decode($this->drupalPost(NULL, $edit, array('path' => $ajax_path, 'triggering_element' => $triggering_element), $options, $headers, $form_html_id)); // We need $ajax_settings['wrapper'] to perform DOM manipulation. @@ -2376,7 +2376,7 @@ class DrupalWebTestCase extends DrupalTestCase { if (!$message) { $message = t('Raw "@raw" found', array('@raw' => $raw)); } - return $this->assert(strpos($this->content, $raw) !== FALSE, $message, $group); + return $this->assert(strpos($this->drupalGetContent(), $raw) !== FALSE, $message, $group); } /** @@ -2396,7 +2396,7 @@ class DrupalWebTestCase extends DrupalTestCase { if (!$message) { $message = t('Raw "@raw" not found', array('@raw' => $raw)); } - return $this->assert(strpos($this->content, $raw) === FALSE, $message, $group); + return $this->assert(strpos($this->drupalGetContent(), $raw) === FALSE, $message, $group); } /** @@ -2453,7 +2453,7 @@ class DrupalWebTestCase extends DrupalTestCase { */ protected function assertTextHelper($text, $message = '', $group, $not_exists) { if ($this->plainTextContent === FALSE) { - $this->plainTextContent = filter_xss($this->content, array()); + $this->plainTextContent = filter_xss($this->drupalGetContent(), array()); } if (!$message) { $message = !$not_exists ? t('"@text" found', array('@text' => $text)) : t('"@text" not found', array('@text' => $text)); @@ -2519,7 +2519,7 @@ class DrupalWebTestCase extends DrupalTestCase { */ protected function assertUniqueTextHelper($text, $message = '', $group, $be_unique) { if ($this->plainTextContent === FALSE) { - $this->plainTextContent = filter_xss($this->content, array()); + $this->plainTextContent = filter_xss($this->drupalGetContent(), array()); } if (!$message) { $message = '"' . $text . '"' . ($be_unique ? ' found only once' : ' found more than once'); diff --git a/modules/system/system.install b/modules/system/system.install index 434787605..51b54af70 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2384,14 +2384,16 @@ function system_update_7053() { ->execute(); } - // Create the same menus as in menu_install(). - db_insert('menu_custom') - ->fields(array('menu_name' => 'user-menu', 'title' => 'User Menu', 'description' => "The <em>User</em> menu contains links related to the user's account, as well as the 'Log out' link.")) - ->execute(); + if (db_table_exists('menu_custom')) { + // Create the same menus as in menu_install(). + db_insert('menu_custom') + ->fields(array('menu_name' => 'user-menu', 'title' => 'User Menu', 'description' => "The <em>User</em> menu contains links related to the user's account, as well as the 'Log out' link.")) + ->execute(); - db_insert('menu_custom') - ->fields(array('menu_name' => 'management', 'title' => 'Management', 'description' => "The <em>Management</em> menu contains links for administrative tasks.")) - ->execute(); + db_insert('menu_custom') + ->fields(array('menu_name' => 'management', 'title' => 'Management', 'description' => "The <em>Management</em> menu contains links for administrative tasks.")) + ->execute(); + } } /** |