You are here

public function ExtensionListTest::testGetAllInstalledInfo in Drupal 8

Same name and namespace in other branches
  1. 9 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 122

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

public function testGetAllInstalledInfo() {
  $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);
}