You are here

public function ContentLoaderTest::testSetPath in YAML Content 8

Test the setContentPath() method.

@covers ::setContentPath

File

tests/src/Unit/ContentLoader/ContentLoaderTest.php, line 23

Class

ContentLoaderTest
Test generic functionality of the ContentLoader class.

Namespace

Drupal\Tests\yaml_content\Unit\ContentLoader

Code

public function testSetPath() {
  $this->contentLoader
    ->setContentPath($this->root
    ->url());
  $reflected_path = (new \ReflectionObject($this->contentLoader))
    ->getProperty('path');
  $reflected_path
    ->setAccessible(TRUE);
  $this
    ->assertEquals($this->root
    ->url(), $reflected_path
    ->getValue($this->contentLoader));
}