You are here

public function HelpTopicTwigLoaderTest::testConstructor in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php \Drupal\Tests\help_topics\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);
}