You are here

public function CriticalCssProviderTest::testSanitizePath in Critical CSS 8

Tests sanitizePath.

@covers ::sanitizePath @dataProvider sanitizePathProvider

Throws

\ReflectionException

File

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

Class

CriticalCssProviderTest
Unit tests for CriticalCssProvider.

Namespace

Drupal\Tests\critical_css\Unit

Code

public function testSanitizePath($rawPath, $sanitizedPath) {
  $method = new ReflectionMethod($this->criticalCssProvider, "sanitizePath");
  $method
    ->setAccessible(TRUE);
  $this
    ->assertEquals($method
    ->invoke($this->criticalCssProvider, $rawPath), $sanitizedPath);
}