You are here

public function PostgresqlConnectionTest::providerEscapeFields in Drupal 8

Data provider for testEscapeField.

Return value

array Array of arrays with the following elements:

  • Expected escaped string.
  • String to escape.

File

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

Class

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

Namespace

Drupal\Tests\Core\Database\Driver\pgsql

Code

public function providerEscapeFields() {
  return [
    [
      'title',
      'title',
    ],
    [
      '"isDefaultRevision"',
      'isDefaultRevision',
    ],
    [
      '"isDefaultRevision"',
      '"isDefaultRevision"',
    ],
    [
      'entity_test."isDefaultRevision"',
      'entity_test.isDefaultRevision',
    ],
    [
      'entity_test."isDefaultRevision"',
      '"entity_test"."isDefaultRevision"',
    ],
    [
      '"entityTest"."isDefaultRevision"',
      '"entityTest"."isDefaultRevision"',
    ],
    [
      '"entityTest"."isDefaultRevision"',
      'entityTest.isDefaultRevision',
    ],
    [
      'entity_test."isDefaultRevision"',
      'entity_test.is.Default.Revision',
    ],
  ];
}