You are here

public function DefaultTableMappingTest::providerTestGetFieldTableName in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest::providerTestGetFieldTableName()

Provides test data for testGetFieldColumnName().

Return value

array[] A nested array where each inner array has the following values: a list of table names and the expected table name.

File

core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php, line 414

Class

DefaultTableMappingTest
@coversDefaultClass \Drupal\Core\Entity\Sql\DefaultTableMapping @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

public function providerTestGetFieldTableName() {
  $data = [];
  $data[] = [
    [
      'data' => 'data_table',
      'base' => 'base_table',
      'revision' => 'revision_table',
    ],
    'data_table',
  ];
  $data[] = [
    [
      'data' => 'data_table',
      'revision' => 'revision_table',
      'base' => 'base_table',
    ],
    'data_table',
  ];
  $data[] = [
    [
      'base' => 'base_table',
      'data' => 'data_table',
      'revision' => 'revision_table',
    ],
    'data_table',
  ];
  $data[] = [
    [
      'base' => 'base_table',
      'revision' => 'revision_table',
      'data' => 'data_table',
    ],
    'data_table',
  ];
  $data[] = [
    [
      'revision' => 'revision_table',
      'data' => 'data_table',
      'base' => 'base_table',
    ],
    'data_table',
  ];
  $data[] = [
    [
      'revision' => 'revision_table',
      'base' => 'base_table',
      'data' => 'data_table',
    ],
    'data_table',
  ];
  $data[] = [
    [
      'data' => 'data_table',
      'revision' => 'revision_table',
    ],
    'data_table',
  ];
  $data[] = [
    [
      'revision' => 'revision_table',
      'data' => 'data_table',
    ],
    'data_table',
  ];
  $data[] = [
    [
      'base' => 'base_table',
      'revision' => 'revision_table',
    ],
    'base_table',
  ];
  $data[] = [
    [
      'revision' => 'revision_table',
      'base' => 'base_table',
    ],
    'base_table',
  ];
  $data[] = [
    [
      'data' => 'data_table',
    ],
    'data_table',
  ];
  $data[] = [
    [
      'base' => 'base_table',
    ],
    'base_table',
  ];
  $data[] = [
    [
      'revision' => 'revision_table',
    ],
    'revision_table',
  ];
  return $data;
}