You are here

public function ZfExtensionManagerSfContainerTest::canonicalizeNameProvider in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php \Drupal\Tests\Component\Bridge\ZfExtensionManagerSfContainerTest::canonicalizeNameProvider()

Data provider for testReverseProxyEnabled.

Replacements: array('-' => '', '_' => '', ' ' => '', '\\' => '', '/' => '')

File

core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php, line 118

Class

ZfExtensionManagerSfContainerTest
@coversDefaultClass \Drupal\Component\Bridge\ZfExtensionManagerSfContainer @group Bridge

Namespace

Drupal\Tests\Component\Bridge

Code

public function canonicalizeNameProvider() {
  return [
    [
      'foobar',
      'foobar',
    ],
    [
      'foo-bar',
      'foobar',
    ],
    [
      'foo_bar',
      'foobar',
    ],
    [
      'foo bar',
      'foobar',
    ],
    [
      'foo\\bar',
      'foobar',
    ],
    [
      'foo/bar',
      'foobar',
    ],
    // There is also a strtolower in canonicalizeName.
    [
      'Foo/bAr',
      'foobar',
    ],
    [
      'foo/-_\\ bar',
      'foobar',
    ],
  ];
}