You are here

public function NodeImportTest::setUp in YAML Content 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/NodeImportTest.php, line 58

Class

NodeImportTest
Tests general Node creation functionality.

Namespace

Drupal\Tests\yaml_content\Functional

Code

public function setUp() {
  parent::setUp();

  // Create our article content type.
  $this
    ->createContentType([
    'type' => 'article',
    'name' => 'Article',
  ]);

  // Prepare the content loader.
  $this->contentLoader = \Drupal::service('yaml_content.content_loader');

  // Look for content files in the tests directory.
  $this->contentLoader
    ->setContentPath(drupal_get_path('module', 'yaml_content') . '/tests');
}