function ConnectionTest::providerEscapeAlias

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerEscapeAlias()
  2. 10 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerEscapeAlias()

Data provider for testEscapeAlias.

Return value

array Array of arrays with the following elements:

  • Expected escaped string.
  • String to escape.

File

core/tests/Drupal/Tests/Core/Database/ConnectionTest.php, line 493

Class

ConnectionTest
Tests the Connection class.

Namespace

Drupal\Tests\Core\Database

Code

public static function providerEscapeAlias() {
    return [
        [
            '!nocase!',
            'nocase',
            [
                '!',
                '!',
            ],
        ],
        [
            '`backtick`',
            'backtick',
            [
                '`',
                '`',
            ],
        ],
        [
            'nocase',
            'nocase',
            [
                '',
                '',
            ],
        ],
        [
            '[brackets]',
            'brackets',
            [
                '[',
                ']',
            ],
        ],
        [
            '"camelCase"',
            '"camelCase"',
        ],
        [
            '"camelCase"',
            'camelCase',
        ],
        [
            '"camelCase"',
            'camel.Case',
        ],
    ];
}

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