protected function PathAliasSearchTest::getPlugin in Freelinking 8.3
Same name and namespace in other branches
- 4.0.x tests/src/Unit/Plugin/freelinking/PathAliasSearchTest.php \Drupal\Tests\freelinking\Unit\Plugin\freelinking\PathAliasSearchTest::getPlugin()
Get plugin instance.
Parameters
string $failoverOption: The failover option.
Return value
\Drupal\freelinking\Plugin\freelinking\PathAlias A plugin instance.
1 call to PathAliasSearchTest::getPlugin()
- PathAliasSearchTest::testBuildLink in tests/
src/ Unit/ Plugin/ freelinking/ PathAliasSearchTest.php - Asserts that buildLink is functional for search failover.
File
- tests/
src/ Unit/ Plugin/ freelinking/ PathAliasSearchTest.php, line 70
Class
- PathAliasSearchTest
- 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);
}