function PostgresqlConnectionTest::providerEscapeTables

Data provider for testEscapeTable.

Return value

array An indexed array of where each value is an array of arguments to pass to testEscapeField. The first value is the expected value, and the second value is the value to test.

File

core/tests/Drupal/Tests/Core/Database/Driver/pgsql/PostgresqlConnectionTest.php, line 37

Class

PostgresqlConnectionTest
@coversDefaultClass \Drupal\Core\Database\Driver\pgsql\Connection @group Database

Namespace

Drupal\Tests\Core\Database\Driver\pgsql

Code

public function providerEscapeTables() {
    return [
        [
            'nocase',
            'nocase',
        ],
        [
            '"camelCase"',
            'camelCase',
        ],
        [
            '"camelCase"',
            '"camelCase"',
        ],
        [
            '"camelCase"',
            'camel/Case',
        ],
        // Sometimes, table names are following the pattern database.schema.table.
[
            '"camelCase".nocase.nocase',
            'camelCase.nocase.nocase',
        ],
        [
            'nocase."camelCase".nocase',
            'nocase.camelCase.nocase',
        ],
        [
            'nocase.nocase."camelCase"',
            'nocase.nocase.camelCase',
        ],
        [
            '"camelCase"."camelCase"."camelCase"',
            'camelCase.camelCase.camelCase',
        ],
    ];
}

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