You are here

public static function ContentProcessorTest::createNodeTest in GatherContent 8.4

Test if entities are created correctly based on GC Items.

File

tests/src/Kernel/ContentProcessorTest.php, line 105

Class

ContentProcessorTest
Class for testing core node import functionality.

Namespace

Drupal\Tests\gathercontent\Kernel

Code

public static function createNodeTest(Item $gcItem, ImportOptions $importOptions, array $files) {
  $operation = Operation::create([
    'type' => 'import',
  ]);
  $importOptions
    ->setOperationUuid($operation
    ->uuid());
  $node = static::getProcessor()
    ->createNode($gcItem, $importOptions, $files);
  $node
    ->save();
  static::assertNodeEqualsGcItem($node
    ->getTranslation('en'), $gcItem, $files);
}