function HelpTopicTwigLoaderTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php \Drupal\Tests\help_topics\Unit\HelpTopicTwigLoaderTest::setUp()
  2. 8.9.x core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php \Drupal\Tests\help_topics\Unit\HelpTopicTwigLoaderTest::setUp()
  3. 10 core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php \Drupal\Tests\help\Unit\HelpTopicTwigLoaderTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php, line 39

Class

HelpTopicTwigLoaderTest
Unit test for the HelpTopicTwigLoader class.

Namespace

Drupal\Tests\help\Unit

Code

protected function setUp() : void {
    parent::setUp();
    $this->setUpVfs();
    $module_handler = $this->createMock(ModuleHandlerInterface::class);
    $module_handler->method('getModuleDirectories')
        ->willReturn($this->directories['module']);
    
    /** @var \Drupal\Core\Extension\ThemeHandlerInterface|\Prophecy\Prophecy\ObjectProphecy $module_handler */
    $theme_handler = $this->createMock(ThemeHandlerInterface::class);
    $theme_handler->method('getThemeDirectories')
        ->willReturn($this->directories['theme']);
    $this->helpLoader = new HelpTopicTwigLoader('\\fake\\root\\path', $module_handler, $theme_handler);
}

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