You are here

public function CriticalCssProviderTest::sanitizePathProvider in Critical CSS 8

Data provider for testSanitizePath.

File

tests/src/Unit/CriticalCssProviderTest.php, line 82

Class

CriticalCssProviderTest
Unit tests for CriticalCssProvider.

Namespace

Drupal\Tests\critical_css\Unit

Code

public function sanitizePathProvider() {
  return [
    [
      "/node/1",
      "node-1",
    ],
    [
      "/node /1ñá",
      "node-1",
    ],
    [
      "/node-/1",
      "node--1",
    ],
    [
      "/",
      "front",
    ],
  ];
}