commit fdcc20554e92caf3f23a0c68ddcf53caf3d7f7a3 Author: Samuel Leathers Date: Fri Aug 16 15:13:31 2013 -0500 fixing bugs diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/SimpleTestErrorCollectorTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/SimpleTestErrorCollectorTest.php index d67056b..5ae7e7f 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/SimpleTestErrorCollectorTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/SimpleTestErrorCollectorTest.php @@ -46,11 +46,12 @@ function testErrorCollect() { $this->collectedErrors = array(); $this->drupalGet('error-test/generate-warnings-with-report'); $this->assertEqual(count($this->collectedErrors), 3, 'Three errors were collected'); + $this->verbose(print_r($this->collectedErrors, TRUE)); if (count($this->collectedErrors) == 3) { - $this->assertError($this->collectedErrors[0], 'Notice', 'Drupal\error_test\Controllers\ErrorTestController->generateWarnings()', 'error_test.module', 'Undefined variable: bananas'); - $this->assertError($this->collectedErrors[1], 'Warning', 'Drupal\error_test\Controllers\ErrorTestController->generateWarnings()', 'error_test.module', 'Division by zero'); - $this->assertError($this->collectedErrors[2], 'User warning', 'Drupal\error_test\Controllers\ErrorTestController->generateWarnings()', 'error_test.module', 'Drupal is awesome'); + $this->assertError($this->collectedErrors[0], 'Notice', 'Drupal\error_test\Controllers\ErrorTestController->generateWarnings()', 'ErrorTestController.php', 'Undefined variable: bananas'); + $this->assertError($this->collectedErrors[1], 'Warning', 'Drupal\error_test\Controllers\ErrorTestController->generateWarnings()', 'ErrorTestController.php', 'Division by zero'); + $this->assertError($this->collectedErrors[2], 'User warning', 'Drupal\error_test\Controllers\ErrorTestController->generateWarnings()', 'ErrorTestController.php', 'Drupal is awesome'); } else { // Give back the errors to the log report. @@ -94,6 +95,7 @@ protected function error($message = '', $group = 'Other', array $caller = NULL) * Asserts that a collected error matches what we are expecting. */ function assertError($error, $group, $function, $file, $message = NULL) { + $this->verbose(print_r($error,TRUE)); $this->assertEqual($error['group'], $group, format_string("Group was %group", array('%group' => $group))); $this->assertEqual($error['caller']['function'], $function, format_string("Function was %function", array('%function' => $function))); $this->assertEqual(drupal_basename($error['caller']['file']), $file, format_string("File was %file", array('%file' => $file))); diff --git a/core/modules/system/tests/modules/error_test/error_test.routing.yml b/core/modules/system/tests/modules/error_test/error_test.routing.yml index e47ba9d..6ddc66e 100644 --- a/core/modules/system/tests/modules/error_test/error_test.routing.yml +++ b/core/modules/system/tests/modules/error_test/error_test.routing.yml @@ -9,6 +9,7 @@ error_test_generate_warnings_with_report: pattern: '/error-test/generate-warnings-with-report' defaults: _content: '\Drupal\error_test\Controllers\ErrorTestController::generateWarnings' + collect_errors: TRUE requirements: _access: 'TRUE'