function HelpSearchPluginTest::testAnnotation
Same name in other branches
- 9 core/modules/help_topics/tests/src/Kernel/HelpSearchPluginTest.php \Drupal\Tests\help_topics\Kernel\HelpSearchPluginTest::testAnnotation()
- 11.x core/modules/help/tests/src/Kernel/HelpSearchPluginTest.php \Drupal\Tests\help\Kernel\HelpSearchPluginTest::testAnnotation()
Tests search plugin annotation and interfaces.
File
-
core/
modules/ help/ tests/ src/ Kernel/ HelpSearchPluginTest.php, line 28
Class
- HelpSearchPluginTest
- Tests search plugin behaviors.
Namespace
Drupal\Tests\help\KernelCode
public function testAnnotation() : void {
/** @var \Drupal\search\SearchPluginManager $manager */
$manager = \Drupal::service('plugin.manager.search');
/** @var \Drupal\help\Plugin\Search\HelpSearch $plugin */
$plugin = $manager->createInstance('help_search');
$this->assertInstanceOf(AccessibleInterface::class, $plugin);
$this->assertInstanceOf(SearchIndexingInterface::class, $plugin);
$this->assertSame('Help', (string) $plugin->getPluginDefinition()['title']);
$this->assertTrue($plugin->usesAdminTheme());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.