public function ComponentsLoaderTest::providerTestAddPath in Components! 8.2
Data provider for testAddPath().
See also
testAddPath()
File
- tests/
src/ Unit/ ComponentsLoaderTest.php, line 278
Class
- ComponentsLoaderTest
- @coversDefaultClass \Drupal\components\Template\Loader\ComponentsLoader @group components
Namespace
Drupal\Tests\components\UnitCode
public function providerTestAddPath() : array {
return [
'basic add' => [
'path' => '/test/templates',
'namespace' => 'sol',
'expected' => [
'/sol/templates',
'/test/templates',
],
],
'Test appending on a namespace that does not exist' => [
'path' => '/pluto/templates',
'namespace' => 'pluto',
'expected' => [
'/pluto/templates',
],
],
'Test trimming the trailing slash off of the path' => [
'path' => '/test/trim/',
'namespace' => 'sol',
'expected' => [
'/sol/templates',
'/test/trim',
],
],
];
}