function RegistryTest::setUpMockModuleList

Reinitializes the module list as a mock object.

1 call to RegistryTest::setUpMockModuleList()
RegistryTest::testGetRegistryForModule in core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
Tests getting the theme registry defined by a module.

File

core/tests/Drupal/Tests/Core/Theme/RegistryTest.php, line 137

Class

RegistryTest
Tests Drupal\Core\Theme\Registry.

Namespace

Drupal\Tests\Core\Theme

Code

protected function setUpMockModuleList() : void {
  $this->moduleList = $this->createMock(ModuleExtensionList::class);
  $reflection = new \ReflectionProperty($this->registry, 'moduleList');
  $reflection->setValue($this->registry, $this->moduleList);
}

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