protected function DrupalOrgTest::getPlugin in Freelinking 8.3
Same name and namespace in other branches
- 4.0.x tests/src/Unit/Plugin/freelinking/DrupalOrgTest.php \Drupal\Tests\freelinking\Unit\Plugin\freelinking\DrupalOrgTest::getPlugin()
Get plugin instance.
Parameters
array $default_settings: The settings to use.
Return value
\Drupal\freelinking\Plugin\freelinking\DrupalOrg A plugin instance.
4 calls to DrupalOrgTest::getPlugin()
- DrupalOrgTest::testBuildLink in tests/
src/ Unit/ Plugin/ freelinking/ DrupalOrgTest.php - Asserts that buildLink returns appropriate render array.
- DrupalOrgTest::testDefaultConfiguration in tests/
src/ Unit/ Plugin/ freelinking/ DrupalOrgTest.php - Asserts that default configuration is expected.
- DrupalOrgTest::testGetIndicator in tests/
src/ Unit/ Plugin/ freelinking/ DrupalOrgTest.php - Assert that the indicator is functional.
- DrupalOrgTest::testGetTip in tests/
src/ Unit/ Plugin/ freelinking/ DrupalOrgTest.php - Assert that getTip() is functional.
File
- tests/
src/ Unit/ Plugin/ freelinking/ DrupalOrgTest.php, line 146
Class
- DrupalOrgTest
- Tests the drupalorg plugin.
Namespace
Drupal\Tests\freelinking\Unit\Plugin\freelinkingCode
protected function getPlugin(array $default_settings = []) {
$settings = $default_settings + [
'scrape' => TRUE,
'node' => TRUE,
'project' => TRUE,
];
$configuration = [
'settings' => $settings,
];
$plugin_definition = [
'id' => 'drupalorg',
'title' => 'Drupal.org External link',
'hidden' => FALSE,
'weight' => 0,
] + $configuration;
return DrupalOrg::create($this->container, $configuration, 'external', $plugin_definition);
}