function HelpTopicTwigLoaderTest::testConstructor

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

@covers ::__construct

File

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

Class

HelpTopicTwigLoaderTest
Unit test for the HelpTopicTwigLoader class.

Namespace

Drupal\Tests\help\Unit

Code

public function testConstructor() : void {
  // Verify that the module/theme directories were added in the constructor,
  // and non-existent directories were omitted.
  $paths = $this->helpLoader
    ->getPaths(HelpTopicTwigLoader::MAIN_NAMESPACE);
  $this->assertCount(2, $paths);
  $this->assertContains($this->directories['module']['test'] . '/help_topics', $paths);
  $this->assertContains($this->directories['theme']['test'] . '/help_topics', $paths);
}

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