You are here

public function ExistenceCheckingTest::contentDataProvider in YAML Content 8

Data provider function to test various content scenarios.

@todo Refactor to provide entity definition and content data.

Return value

array An array of content testing arguments:

  • string Entity Type
  • array Content data structure

File

tests/src/Unit/ContentLoader/ExistenceCheckingTest.php, line 279

Class

ExistenceCheckingTest
Test the existence checking functionality of the ContentLoader class.

Namespace

Drupal\Tests\yaml_content\Unit\ContentLoader

Code

public function contentDataProvider() {
  $test_content['basic_node'] = [
    'entity' => 'node',
    'status' => 1,
    'title' => 'Test Title',
    'body' => [
      'value' => 'Lorem Ipsum',
      'format' => 'full_html',
    ],
    'field_existing_field' => [
      'value' => 'simple',
    ],
  ];
  return [
    [
      'node',
      $test_content['basic_node'],
    ],
  ];
}