public function ComponentsLoaderTest::testPrependPath in Components! 8.2
Tests prepending paths to a namespace.
@covers ::prependPath
@dataProvider providerTestPrependPath
Parameters
string $path: Path to prepend.
string $namespace: Namespace to alter.
array $expected: Expected namespace paths.
Throws
File
- tests/
src/ Unit/ ComponentsLoaderTest.php, line 314
Class
- ComponentsLoaderTest
- @coversDefaultClass \Drupal\components\Template\Loader\ComponentsLoader @group components
Namespace
Drupal\Tests\components\UnitCode
public function testPrependPath(string $path, string $namespace, array $expected) {
$this->systemUnderTest
->prependPath($path, $namespace);
$result = $this->systemUnderTest
->getPaths($namespace);
$this
->assertEquals($expected, $result);
}