diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-16 00:00:17 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-16 00:00:17 +0000 |
commit | ab190206e75a11316753a73decffd5516e6945b9 (patch) | |
tree | 332cc1f7a3c1c5a8bd55dfd68f58cf764b103f19 /modules | |
parent | 0bdaa32692bca9dd1bf2acd9756a01c5a5228e74 (diff) | |
download | brdo-ab190206e75a11316753a73decffd5516e6945b9.tar.gz brdo-ab190206e75a11316753a73decffd5516e6945b9.tar.bz2 |
#642160 by boombatower, Damien Tournoud: Make debug() message more usable.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/tests/error.test | 16 | ||||
-rw-r--r-- | modules/system/system.test | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/modules/simpletest/tests/error.test b/modules/simpletest/tests/error.test index fe4ee4526..fdaab2bb8 100644 --- a/modules/simpletest/tests/error.test +++ b/modules/simpletest/tests/error.test @@ -23,21 +23,21 @@ class DrupalErrorHandlerUnitTest extends DrupalWebTestCase { function testErrorHandler() { $error_notice = array( '%type' => 'Notice', - '%message' => 'Undefined variable: bananas', + '!message' => 'Undefined variable: bananas', '%function' => 'error_test_generate_warnings()', '%line' => 44, '%file' => drupal_realpath('modules/simpletest/tests/error_test.module'), ); $error_warning = array( '%type' => 'Warning', - '%message' => 'Division by zero', + '!message' => 'Division by zero', '%function' => 'error_test_generate_warnings()', '%line' => 46, '%file' => drupal_realpath('modules/simpletest/tests/error_test.module'), ); $error_user_notice = array( '%type' => 'User warning', - '%message' => 'Drupal is awesome', + '!message' => 'Drupal is awesome', '%function' => 'error_test_generate_warnings()', '%line' => 48, '%file' => drupal_realpath('modules/simpletest/tests/error_test.module'), @@ -74,14 +74,14 @@ class DrupalErrorHandlerUnitTest extends DrupalWebTestCase { function testExceptionHandler() { $error_exception = array( '%type' => 'Exception', - '%message' => 'Drupal is awesome', + '!message' => 'Drupal is awesome', '%function' => 'error_test_trigger_exception()', '%line' => 57, '%file' => drupal_realpath('modules/simpletest/tests/error_test.module'), ); $error_pdo_exception = array( '%type' => 'PDOException', - '%message' => 'SELECT * FROM bananas_are_awesome', + '!message' => 'SELECT * FROM bananas_are_awesome', '%function' => 'error_test_trigger_pdo_exception()', '%line' => 65, '%file' => drupal_realpath('modules/simpletest/tests/error_test.module'), @@ -96,7 +96,7 @@ class DrupalErrorHandlerUnitTest extends DrupalWebTestCase { // We cannot use assertErrorMessage() since the extact error reported // varies from database to database. Check that the SQL string is displayed. $this->assertText($error_pdo_exception['%type'], t('Found %type in error page.', $error_pdo_exception)); - $this->assertText($error_pdo_exception['%message'], t('Found %message in error page.', $error_pdo_exception)); + $this->assertText($error_pdo_exception['!message'], t('Found !message in error page.', $error_pdo_exception)); $error_details = t('in %function (line %line of %file)', $error_pdo_exception); $this->assertRaw($error_details, t("Found '!message' in error page.", array('!message' => $error_details))); } @@ -105,7 +105,7 @@ class DrupalErrorHandlerUnitTest extends DrupalWebTestCase { * Helper function: assert that the error message is found. */ function assertErrorMessage(array $error) { - $message = t('%type: %message in %function (line %line of %file).', $error); + $message = t('%type: !message in %function (line %line of %file).', $error); $this->assertRaw($message, t('Error !message found.', array('!message' => $message))); } @@ -113,7 +113,7 @@ class DrupalErrorHandlerUnitTest extends DrupalWebTestCase { * Helper function: assert that the error message is not found. */ function assertNoErrorMessage(array $error) { - $message = t('%type: %message in %function (line %line of %file).', $error); + $message = t('%type: !message in %function (line %line of %file).', $error); $this->assertNoRaw($message, t('Error !message not found.', array('!message' => $message))); } } diff --git a/modules/system/system.test b/modules/system/system.test index da7042ac2..511c9c28e 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -1942,7 +1942,7 @@ class ShutdownFunctionsTest extends DrupalWebTestCase { // Make sure exceptions displayed through _drupal_render_exception_safe() // are correctly escaped. - $this->assertText('Drupal is <blink>awesome</blink>.'); + $this->assertRaw('Drupal is &lt;blink&gt;awesome&lt;/blink&gt;.'); } } |