private function MongoDBLogTestCase::verifyReports in MongoDB 6
Same name and namespace in other branches
- 8 mongodb_watchdog/mongodb_watchdog.test \MongoDBLogTestCase::verifyReports()
- 7 mongodb_watchdog/mongodb_watchdog.test \MongoDBLogTestCase::verifyReports()
Verify the logged-in user has the desired access to the various log nodes.
Parameters
int $response: HTTP response code.
File
- mongodb_watchdog/
mongodb_watchdog.test, line 264 - Test class for MongoDB_watchdog.
Class
- MongoDBLogTestCase
- Test the behaviour of watchdog() mongodb_watchdog, not dblog.
Code
private function verifyReports($response = 200) {
// View dblog help node.
$this
->drupalGet('admin/help/dblog');
$this
->assertResponse($response);
if ($response == 200) {
$this
->assertText(t('Database logging'), t('DBLog help was displayed'));
}
// View dblog report node.
$this
->drupalGet('admin/reports/dblog');
$this
->assertResponse($response);
if ($response == 200) {
$this
->assertText(t('Recent log entries'), t('DBLog report was displayed'));
}
// View dblog page-not-found report node.
$this
->drupalGet('admin/reports/page-not-found');
$this
->assertResponse($response);
if ($response == 200) {
$this
->assertText(t("Top 'page not found' errors"), t('DBLog page-not-found report was displayed'));
}
// View dblog access-denied report node.
$this
->drupalGet('admin/reports/access-denied');
$this
->assertResponse($response);
if ($response == 200) {
$this
->assertText(t("Top 'access denied' errors"), t('DBLog access-denied report was displayed'));
}
// View dblog event node.
$this
->drupalGet('admin/reports/event/1');
$this
->assertResponse($response);
if ($response == 200) {
$this
->assertText(t('Details'), t('DBLog event node was displayed'));
}
}