function UpdateManagerUpdateTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php \Drupal\Tests\update\Functional\UpdateManagerUpdateTest::setUp()
  2. 8.9.x core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php \Drupal\Tests\update\Functional\UpdateManagerUpdateTest::setUp()
  3. 10 core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php \Drupal\Tests\update\Functional\UpdateManagerUpdateTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php, line 35

Class

UpdateManagerUpdateTest
Tests the Update Manager module's 'Update' form and functionality.

Namespace

Drupal\Tests\update\Functional

Code

protected function setUp() : void {
    parent::setUp();
    $admin_user = $this->drupalCreateUser([
        'administer software updates',
        'administer site configuration',
    ]);
    $this->drupalLogin($admin_user);
    // The installed state of the system is the same for all test cases. What
    // varies for each test scenario is which release history fixture we fetch,
    // which in turn changes the expected state of the UpdateManagerUpdateForm.
    $this->mockInstalledExtensionsInfo([
        'aaa_update_test' => [
            'project' => 'aaa_update_test',
            'version' => '8.x-1.0',
            'hidden' => FALSE,
        ],
        'bbb_update_test' => [
            'project' => 'bbb_update_test',
            'version' => '8.x-1.0',
            'hidden' => FALSE,
        ],
        'ccc_update_test' => [
            'project' => 'ccc_update_test',
            'version' => '8.x-1.0',
            'hidden' => FALSE,
        ],
    ]);
    $this->mockDefaultExtensionsInfo([
        'version' => '8.0.0',
    ]);
}

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