function ExtensionListTest::getMocks

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php \Drupal\Tests\Core\Extension\ExtensionListTest::getMocks()
  2. 8.9.x core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php \Drupal\Tests\Core\Extension\ExtensionListTest::getMocks()
  3. 10 core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php \Drupal\Tests\Core\Extension\ExtensionListTest::getMocks()
3 calls to ExtensionListTest::getMocks()
ExtensionListTest::setupTestExtensionList in core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
Sets up an a test extension list.
ExtensionListTest::testGetNameWithNonExistingExtension in core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
@covers ::getName
ExtensionListTest::testGetWithNonExistingExtension in core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php
@covers ::get

File

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

Class

ExtensionListTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Extension%21ExtensionList.php/class/ExtensionList/11.x" title="Provides available extensions." class="local">\Drupal\Core\Extension\ExtensionList</a> @group Extension

Namespace

Drupal\Tests\Core\Extension

Code

protected function getMocks() {
    $cache = $this->prophesize(CacheBackendInterface::class);
    $info_parser = $this->prophesize(InfoParserInterface::class);
    $module_handler = $this->prophesize(ModuleHandlerInterface::class);
    $state = $this->prophesize(StateInterface::class);
    return [
        $cache,
        $info_parser,
        $module_handler,
        $state,
    ];
}

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