function ExtensionListTest::testGetExtensionInfo

Same name 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()
  3. 11.x 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);
}

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