function StatisticsReportsTest::testRecentHits

Verifies that 'Recent hits' renders properly and displays the added hit.

File

drupal/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php, line 25
Definition of Drupal\statistics\Tests\StatisticsReportsTest.

Class

StatisticsReportsTest
Tests that report pages render properly, and that access logging works.

Namespace

Drupal\statistics\Tests

Code

function testRecentHits() {
  $this
    ->drupalGet('admin/reports/hits');
  $this
    ->assertText('test', 'Hit title found.');
  $this
    ->assertText('node/1', 'Hit URL found.');
  $this
    ->assertText('Anonymous', 'Hit user found.');
}