protected function PathAliasTest::getPlugin in Freelinking 8.3
Same name and namespace in other branches
- 4.0.x tests/src/Unit/Plugin/freelinking/PathAliasTest.php \Drupal\Tests\freelinking\Unit\Plugin\freelinking\PathAliasTest::getPlugin()
Get plugin instance.
Parameters
string $failoverOption: The failover option.
Return value
\Drupal\freelinking\Plugin\freelinking\PathAlias A plugin instance.
4 calls to PathAliasTest::getPlugin()
- PathAliasTest::testBuildLink in tests/
src/ Unit/ Plugin/ freelinking/ PathAliasTest.php - Asserts that buildLink is functional for valid and invalid path aliases.
- PathAliasTest::testDefaultConfiguration in tests/
src/ Unit/ Plugin/ freelinking/ PathAliasTest.php - Asserts that defaultConfiguration provides the correct settings.
- PathAliasTest::testGetIndicator in tests/
src/ Unit/ Plugin/ freelinking/ PathAliasTest.php - Asserts that the indicator is functional.
- PathAliasTest::testGetTip in tests/
src/ Unit/ Plugin/ freelinking/ PathAliasTest.php - Asserts that getTip is functional.
File
- tests/
src/ Unit/ Plugin/ freelinking/ PathAliasTest.php, line 72
Class
- PathAliasTest
- Tests the path_alias plugin.
Namespace
Drupal\Tests\freelinking\Unit\Plugin\freelinkingCode
protected function getPlugin($failoverOption = 'search') {
$configuration = [
'settings' => [
'failover' => $failoverOption,
],
];
$plugin_definition = [
'id' => 'path_alias',
'title' => 'Path Alias',
'hidden' => FALSE,
'weight' => 0,
] + $configuration;
return PathAlias::create($this->container, $configuration, 'path_alias', $plugin_definition);
}