function ExtensionListTest::testGet

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

@covers ::get

File

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

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

public function testGet() {
    $test_extension_list = $this->setupTestExtensionList();
    $extension = $test_extension_list->get('test_name');
    $this->assertInstanceOf(Extension::class, $extension);
    $this->assertEquals('test_name', $extension->getName());
}

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