function PagerTest::setUp

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Pager/PagerTest.php \Drupal\Tests\system\Functional\Pager\PagerTest::setUp()
  2. 8.9.x core/modules/system/tests/src/Functional/Pager/PagerTest.php \Drupal\Tests\system\Functional\Pager\PagerTest::setUp()
  3. 10 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 42

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.