summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r--modules/simpletest/tests/session_test.module7
-rw-r--r--modules/simpletest/tests/system_test.module3
2 files changed, 9 insertions, 1 deletions
diff --git a/modules/simpletest/tests/session_test.module b/modules/simpletest/tests/session_test.module
index 42c47a08c..b183ec38c 100644
--- a/modules/simpletest/tests/session_test.module
+++ b/modules/simpletest/tests/session_test.module
@@ -33,7 +33,12 @@ function session_test_menu() {
* Page callback, prints the stored session value to the screen.
*/
function _session_test_get() {
- return t('The current value of the stored session variable is: %val', array('%val' => $_SESSION['session_test_value']));
+ if (!empty($_SESSION['session_test_value'])) {
+ return t('The current value of the stored session variable is: %val', array('%val' => $_SESSION['session_test_value']));
+ }
+ else {
+ return "";
+ }
}
/**
diff --git a/modules/simpletest/tests/system_test.module b/modules/simpletest/tests/system_test.module
index bd3eff6c5..2134359d2 100644
--- a/modules/simpletest/tests/system_test.module
+++ b/modules/simpletest/tests/system_test.module
@@ -146,6 +146,7 @@ function system_test_modules_uninstalled($modules) {
* Menu callback; generate warnings to test the error handler.
*/
function system_test_generate_warnings() {
+ define('SIMPLETEST_DONT_COLLECT_ERRORS', TRUE);
// This will generate a notice.
$monkey_love = $bananas;
// This will generate a warning.
@@ -159,6 +160,7 @@ function system_test_generate_warnings() {
* Menu callback; trigger an exception to test the exception handler.
*/
function system_test_trigger_exception() {
+ define('SIMPLETEST_DONT_COLLECT_ERRORS', TRUE);
throw new Exception("Drupal is awesome");
}
@@ -166,5 +168,6 @@ function system_test_trigger_exception() {
* Menu callback; trigger an exception to test the exception handler.
*/
function system_test_trigger_pdo_exception() {
+ define('SIMPLETEST_DONT_COLLECT_ERRORS', TRUE);
db_query("SELECT * FROM bananas_are_awesome");
}