public function AuditFilesUsedNotManagedTest::testReportPage in Audit Files 4.x
Tests report page returns correct HTTP response code.
File
- tests/
src/ FunctionalJavascript/ AuditFilesUsedNotManagedTest.php, line 74
Class
- AuditFilesUsedNotManagedTest
- Tests that the "Used not managed" report is reachable with no errors.
Namespace
Drupal\Tests\auditfiles\FunctionalJavascriptCode
public function testReportPage() {
// Form to test.
$path = URL::fromRoute('auditfiles.audit_files_usednotmanaged');
// Establish session.
$session = $this
->assertSession();
// Visit page as anonymous user, should get Access Denied message.
$this
->drupalGet($path);
$session
->pageTextContains('Access denied');
// Log in as admin user.
$this
->drupalLogin($this->user);
// Test that report page returns the report page.
$this
->drupalGet($path);
$session
->pageTextContains('Used not managed');
}