function HelpTopicTwigLoaderTest::testConstructor

Same name in other branches
  1. 9 core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php \Drupal\Tests\help_topics\Unit\HelpTopicTwigLoaderTest::testConstructor()
  2. 10 core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php \Drupal\Tests\help\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_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php, line 46

Class

HelpTopicTwigLoaderTest
Unit test for the HelpTopicTwigLoader class.

Namespace

Drupal\Tests\help_topics\Unit

Code

public function testConstructor() {
    // 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.