You are here

public function ConnectionTest::providerEscapeMethods in Drupal 8

Dataprovider for testEscapeMethods().

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 111

Class

ConnectionTest
Tests the Connection class.

Namespace

Drupal\Tests\Core\Database

Code

public function providerEscapeMethods() {
  return [
    [
      'thing',
      'thing',
    ],
    [
      '_item',
      '_item',
    ],
    [
      'item_',
      'item_',
    ],
    [
      '_item_',
      '_item_',
    ],
    [
      '',
      '!@#$%^&*()-=+',
    ],
    [
      '123',
      '!1@2#3',
    ],
  ];
}