You are here

public function PostgresqlConnectionTest::providerEscapeFields in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Database/Driver/pgsql/PostgresqlConnectionTest.php \Drupal\Tests\Core\Database\Driver\pgsql\PostgresqlConnectionTest::providerEscapeFields()

Data provider for testEscapeField.

Return value

[] 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 75
Contains \Drupal\Tests\Core\Database\Driver\pgsql\PostgresqlConnectionTest.

Class

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

Namespace

Drupal\Tests\Core\Database\Driver\pgsql

Code

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