Commit c81a6ef8 authored by alexpott's avatar alexpott

Issue #2267053 by sidharthap, Daniel Norton, iMiksu, emclaughlin | joachim:...

Issue #2267053 by sidharthap, Daniel Norton, iMiksu, emclaughlin | joachim: Fixed breadcrumb is wrong on single log event pages.
parent eeddd823
......@@ -7,7 +7,7 @@ dblog.overview:
_permission: 'access site reports'
dblog.event:
path: '/admin/reports/event/{event_id}'
path: '/admin/reports/dblog/event/{event_id}'
defaults:
_content: '\Drupal\dblog\Controller\DbLogController::eventDetails'
_title: 'Details'
......
......@@ -70,6 +70,7 @@ function testDbLog() {
$this->verifyCron($row_limit);
$this->verifyEvents();
$this->verifyReports();
$this->verifyBreadcrumbs();
// Login the regular user.
$this->drupalLogin($this->any_user);
......@@ -186,11 +187,23 @@ private function verifyReports($response = 200) {
// View the database log event page.
$wid = db_query('SELECT MIN(wid) FROM {watchdog}')->fetchField();
$this->drupalGet('admin/reports/event/' . $wid);
$this->drupalGet('admin/reports/dblog/event/' . $wid);
$this->assertResponse($response);
if ($response == 200) {
$this->assertText(t('Details'), 'DBLog event node was displayed');
}
}
/**
* Generates and then verifies breadcrumbs.
*/
private function verifyBreadcrumbs() {
// View the database log event page.
$wid = db_query('SELECT MIN(wid) FROM {watchdog}')->fetchField();
$this->drupalGet('admin/reports/dblog/event/' . $wid);
$xpath = '//nav[@class="breadcrumb"]/ol/li[last()]/a';
$this->assertEqual(current($this->xpath($xpath)), 'Recent log messages', 'DBLogs link displayed at breadcrumb in event page.');
}
/**
......@@ -274,7 +287,7 @@ private function doUser() {
foreach ($links->attributes() as $attr => $value) {
if ($attr == 'href') {
// Extract link to details page.
$link = drupal_substr($value, strpos($value, 'admin/reports/event/'));
$link = drupal_substr($value, strpos($value, 'admin/reports/dblog/event/'));
$this->drupalGet($link);
// Check for full message text on the details page.
$this->assertRaw($message, 'DBLog event details was found: [delete user]');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment