You are here

public function PagererTest::setUp in Pagerer 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/PagererTest.php \Drupal\Tests\pagerer\Functional\PagererTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/PagererTest.php, line 21

Class

PagererTest
Checks Pagerer functionality.

Namespace

Drupal\Tests\pagerer\Functional

Code

public function setUp() {
  parent::setUp();

  // Insert 300 log messages.
  $logger = $this->container
    ->get('logger.factory')
    ->get('pager_test');
  for ($i = 0; $i < 300; $i++) {
    $logger
      ->debug($this
      ->randomString());
  }
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'access site reports',
    'administer site configuration',
  ]));
}