summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-10-31 13:08:29 +0000
committerDries Buytaert <dries@buytaert.net>2010-10-31 13:08:29 +0000
commit64884285411875bd2e47ee0000c60308dd4b1386 (patch)
tree17c61d25cf7114f6c22672b24b8c8462984771c5 /modules/simpletest
parent771cd5cba13c7e6d547cc9d0f8efa8ca9c14ef75 (diff)
downloadbrdo-64884285411875bd2e47ee0000c60308dd4b1386.tar.gz
brdo-64884285411875bd2e47ee0000c60308dd4b1386.tar.bz2
- Patch #951774 by Damien Tournoud: DOMDocument::loadHTML() should not be called statically.
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/drupal_web_test_case.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 6ec5e6552..534affd70 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -1585,7 +1585,8 @@ class DrupalWebTestCase extends DrupalTestCase {
if (!$this->elements) {
// DOM can load HTML soup. But, HTML soup can throw warnings, suppress
// them.
- @$htmlDom = DOMDocument::loadHTML($this->drupalGetContent());
+ $htmlDom = new DOMDocument();
+ @$htmlDom->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
@@ -1857,7 +1858,8 @@ class DrupalWebTestCase extends DrupalTestCase {
);
// DOM can load HTML soup. But, HTML soup can throw warnings, suppress
// them.
- @$dom = DOMDocument::loadHTML($content);
+ $dom = new DOMDocument();
+ @$dom->loadHTML($content);
foreach ($return as $command) {
switch ($command['command']) {
case 'settings':