You are here

protected function PagerTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Pager/PagerTest.php \Drupal\Tests\system\Functional\Pager\PagerTest::setUp()
  2. 9 core/modules/system/tests/src/Functional/Pager/PagerTest.php \Drupal\Tests\system\Functional\Pager\PagerTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/system/tests/src/Functional/Pager/PagerTest.php, line 39

Class

PagerTest
Tests pager functionality.

Namespace

Drupal\Tests\system\Functional\Pager

Code

protected function setUp() : void {
  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->adminUser = $this
    ->drupalCreateUser([
    'access site reports',
    'administer image styles',
  ]);
  $this
    ->drupalLogin($this->adminUser);
}