From 3bbd9a7fa42e777a069b73e6d46052f7e87e8498 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 22 May 2008 19:32:52 +0000 Subject: [PATCH] - Patch #260812 by boombatower: add failure message to DrupalWebTestCase->parse(). --- modules/simpletest/drupal_web_test_case.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 2084695541d..07d560a26a2 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -9,6 +9,7 @@ class DrupalWebTestCase extends UnitTestCase { protected $_content; protected $plain_text; protected $ch; + protected $elements; protected $_modules = array(); // We do not reuse the cookies in further runs, so we do not need a file // but we still need cookie handling, so we set the jar to NULL @@ -490,6 +491,9 @@ class DrupalWebTestCase extends UnitTestCase { $this->elements = simplexml_import_dom($htmlDom); } } + if (!$this->elements) { + $this->fail(t('Parsed page successfully.'), t('Browser')); + } return $this->elements; }