private function DbLogTest::verifyLinkEscaping in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/dblog/src/Tests/DbLogTest.php \Drupal\dblog\Tests\DbLogTest::verifyLinkEscaping()
Tests the escaping of links in the operation row of a database log detail page.
1 call to DbLogTest::verifyLinkEscaping()
- DbLogTest::testDbLog in core/
modules/ dblog/ src/ Tests/ DbLogTest.php - Tests Database Logging module functionality through interfaces.
File
- core/
modules/ dblog/ src/ Tests/ DbLogTest.php, line 273 - Contains \Drupal\dblog\Tests\DbLogTest.
Class
- DbLogTest
- Generate events and verify dblog entries; verify user access to log reports based on permissions.
Namespace
Drupal\dblog\TestsCode
private function verifyLinkEscaping() {
$link = \Drupal::l('View', Url::fromRoute('entity.node.canonical', array(
'node' => 1,
)));
$message = 'Log entry added to do the verifyLinkEscaping test.';
$this
->generateLogEntries(1, array(
'message' => $message,
'link' => $link,
));
$result = db_query_range('SELECT wid FROM {watchdog} ORDER BY wid DESC', 0, 1);
$this
->drupalGet('admin/reports/dblog/event/' . $result
->fetchField());
// Check if the link exists (unescaped).
$this
->assertRaw($link);
}