You are here

public function ExtensionListTest::testGetExtensionInfo 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::testGetExtensionInfo()
  2. 10 core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php \Drupal\Tests\Core\Extension\ExtensionListTest::testGetExtensionInfo()

@covers ::getExtensionInfo @covers ::getAllInstalledInfo

File

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

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

public function testGetExtensionInfo() {
  $test_extension_list = $this
    ->setupTestExtensionList();
  $test_extension_list
    ->setInstalledExtensions([
    'test_name',
  ]);
  $info = $test_extension_list
    ->getExtensionInfo('test_name');
  $this
    ->assertEquals([
    'type' => 'test_extension',
    'core' => '8.x',
    'name' => 'test name',
    'mtime' => 123456789,
  ], $info);
}