function DefaultTableMappingTest::providerTestGetFieldTableName

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest::providerTestGetFieldTableName()
  2. 8.9.x core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest::providerTestGetFieldTableName()
  3. 11.x 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 419

Class

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

Namespace

Drupal\Tests\Core\Entity\Sql

Code

public static 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.