You are here

public function NodeImportExportTest::nodeEntityDataProvider in Acquia Content Hub 8.2

Data provider for testNodeEntity.

Return value

array Data sets.

File

tests/src/Kernel/NodeImportExportTest.php, line 100

Class

NodeImportExportTest
Tests node imports and exports.

Namespace

Drupal\Tests\acquia_contenthub\Kernel

Code

public function nodeEntityDataProvider() {
  $export_uuid = '5d1ba3c3-d527-4328-8fce-a6b714c5ef79';
  if (version_compare(\Drupal::VERSION, '8.8.0', '<')) {
    $export_uuid = '38f023d8-b0d8-4e8c-9c06-8b547d8a0a85';
  }
  return [
    // Single Language, Simple Node.
    [
      0,
      [
        [
          'type' => 'node',
          'uuid' => $export_uuid,
        ],
      ],
      'node',
      $export_uuid,
    ],
    // Single Language Node with a File Attached.
    [
      1,
      [
        [
          'type' => 'node',
          'uuid' => 'f88ac4d1-50b9-4d39-b870-e97fa685e248',
        ],
        [
          'type' => 'file',
          'uuid' => '219ebded-70e6-459c-b29b-7686102e9bf3',
        ],
      ],
      'node',
      'f88ac4d1-50b9-4d39-b870-e97fa685e248',
    ],
    // Multilingual Node with the default language.
    [
      2,
      [
        [
          'type' => 'node',
          'uuid' => 'b0137bab-a80e-4305-84fe-4d99ffd906c5',
        ],
      ],
      'node',
      'b0137bab-a80e-4305-84fe-4d99ffd906c5',
    ],
    // Single Language Node without the default language.
    [
      3,
      [
        [
          'type' => 'node',
          'uuid' => 'c3910d90-e4ff-467e-9bb4-5c1b5bb43008',
        ],
      ],
      'node',
      'c3910d90-e4ff-467e-9bb4-5c1b5bb43008',
    ],
    // Single Language Node with links.
    [
      4,
      [
        [
          'type' => 'node',
          'uuid' => 'fcec27d0-eb50-4ef4-8fb5-2cc736414a7f',
        ],
      ],
      'node',
      'fcec27d0-eb50-4ef4-8fb5-2cc736414a7f',
    ],
    // Node with recursive dependencies.
    [
      5,
      [
        [
          'type' => 'node',
          'uuid' => 'd1aee8f8-e868-496d-a8f7-5b9a8df2de7e',
        ],
      ],
      'node',
      'd1aee8f8-e868-496d-a8f7-5b9a8df2de7e',
    ],
    // Node with custom content moderation state.
    [
      6,
      [
        [
          'type' => 'node',
          'uuid' => '3405e162-4b3e-42ca-aa7b-9ba9fc78eb02',
        ],
      ],
      'node',
      '3405e162-4b3e-42ca-aa7b-9ba9fc78eb02',
    ],
  ];
}