Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3338541
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3338541
Commits
33c16bf2
Unverified
Commit
33c16bf2
authored
4 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3087879
by andypost, jhodgdon, alexpott: Use admin theme annotation for help topics search
parent
bd4c5f07
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/modules/help_topics/src/Plugin/Search/HelpSearch.php
+2
-1
2 additions, 1 deletion
core/modules/help_topics/src/Plugin/Search/HelpSearch.php
core/modules/help_topics/tests/src/Kernel/HelpSearchPluginTest.php
+37
-0
37 additions, 0 deletions
...les/help_topics/tests/src/Kernel/HelpSearchPluginTest.php
with
39 additions
and
1 deletion
core/modules/help_topics/src/Plugin/Search/HelpSearch.php
+
2
−
1
View file @
33c16bf2
...
...
@@ -33,7 +33,8 @@
*
* @SearchPlugin(
* id = "help_search",
* title = @Translation("Help")
* title = @Translation("Help"),
* use_admin_theme = TRUE,
* )
*
* @internal
...
...
This diff is collapsed.
Click to expand it.
core/modules/help_topics/tests/src/Kernel/HelpSearchPluginTest.php
0 → 100644
+
37
−
0
View file @
33c16bf2
<?php
namespace
Drupal\Tests\help_topics\Kernel
;
use
Drupal\Core\Access\AccessibleInterface
;
use
Drupal\KernelTests\KernelTestBase
;
use
Drupal\search\Plugin\SearchIndexingInterface
;
/**
* Tests search plugin behaviors.
*
* @group help_topics
*
* @see \Drupal\help_topics\Plugin\Search\HelpSearch
*/
class
HelpSearchPluginTest
extends
KernelTestBase
{
/**
* {@inheritdoc}
*/
protected
static
$modules
=
[
'help'
,
'help_topics'
,
'search'
];
/**
* Tests search plugin annotation and interfaces.
*/
public
function
testAnnotation
()
{
/** @var \Drupal\search\SearchPluginManager $manager */
$manager
=
\Drupal
::
service
(
'plugin.manager.search'
);
/** @var \Drupal\help_topics\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
());
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment