function SimpleTestErrorCollectorTest::assertError in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/src/Tests/Common/SimpleTestErrorCollectorTest.php \Drupal\system\Tests\Common\SimpleTestErrorCollectorTest::assertError()
Asserts that a collected error matches what we are expecting.
1 call to SimpleTestErrorCollectorTest::assertError()
- SimpleTestErrorCollectorTest::testErrorCollect in core/
modules/ system/ src/ Tests/ Common/ SimpleTestErrorCollectorTest.php - Tests that simpletest collects errors from the tested site.
File
- core/
modules/ system/ src/ Tests/ Common/ SimpleTestErrorCollectorTest.php, line 90 - Contains \Drupal\system\Tests\Common\SimpleTestErrorCollectorTest.
Class
- SimpleTestErrorCollectorTest
- Tests SimpleTest error and exception collector.
Namespace
Drupal\system\Tests\CommonCode
function assertError($error, $group, $function, $file, $message = NULL) {
$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,
)));
if (isset($message)) {
$this
->assertEqual($error['message'], $message, format_string("Message was %message", array(
'%message' => $message,
)));
}
}