function ExtensionListTest::testGetAllInstalledInfo

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php \Drupal\Tests\Core\Extension\ExtensionListTest::testGetAllInstalledInfo()
  2. 8.9.x core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php \Drupal\Tests\Core\Extension\ExtensionListTest::testGetAllInstalledInfo()
  3. 11.x core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php \Drupal\Tests\Core\Extension\ExtensionListTest::testGetAllInstalledInfo()

@covers ::getAllInstalledInfo

File

core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php, line 124

Class

ExtensionListTest
@coversDefaultClass \Drupal\Core\Extension\ExtensionList @group Extension

Namespace

Drupal\Tests\Core\Extension

Code

public function testGetAllInstalledInfo() : void {
    $test_extension_list = $this->setupTestExtensionList([
        'test_name',
        'test_name_2',
    ]);
    $test_extension_list->setInstalledExtensions([
        'test_name_2',
    ]);
    $infos = $test_extension_list->getAllInstalledInfo();
    $this->assertEquals([
        'test_name_2' => [
            'type' => 'test_extension',
            'core' => '8.x',
            'name' => 'test name',
            'mtime' => 123456789,
        ],
    ], $infos);
}

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