Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
bf8f70b0
Commit
bf8f70b0
authored
Feb 13, 2014
by
alexpott
Browse files
Issue
#2183951
by prics | jhodgdon: Fix up some search tests.
parent
a1cf022f
Changes
5
Hide whitespace changes
Inline
Side-by-side
core/modules/search/lib/Drupal/search/Tests/SearchKeywordsConditionsTest.php
View file @
bf8f70b0
...
...
@@ -2,13 +2,17 @@
/**
* @file
*
Definition of
Drupal\search\Tests\SearchKeywordsConditionsTest.
*
Contains \
Drupal\search\Tests\SearchKeywordsConditionsTest.
*/
namespace
Drupal\search\Tests
;
/**
* Tests keywords and conditions.
* Tests the searching without keywords.
*
* Verifies that a plugin can override the isSearchExecutable() method to allow
* searching without keywords set and that GET query parameters are made
* available to plugins during search execution.
*/
class
SearchKeywordsConditionsTest
extends
SearchTestBase
{
...
...
@@ -22,7 +26,7 @@ class SearchKeywordsConditionsTest extends SearchTestBase {
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'Keywords and conditions'
,
'description'
=>
'Verify the search
pulls in
keywords and extra conditions.'
,
'description'
=>
'Verify the search
without
keywords
set
and extra conditions.'
,
'group'
=>
'Search'
,
);
}
...
...
core/modules/search/lib/Drupal/search/Tests/SearchNode
Access
Test.php
→
core/modules/search/lib/Drupal/search/Tests/SearchNode
Punctuation
Test.php
View file @
bf8f70b0
...
...
@@ -2,29 +2,22 @@
/**
* @file
*
Definition of
Drupal\search\Tests\SearchNode
Access
Test.
*
Contains \
Drupal\search\Tests\SearchNode
Punctuation
Test.
*/
namespace
Drupal\search\Tests
;
/**
* Tests node search with
node access control
.
* Tests node search with
punctuation
.
*/
class
SearchNodeAccessTest
extends
SearchTestBase
{
/**
* Modules to enable.
*
* @var array
*/
public
static
$modules
=
array
(
'node_access_test'
);
class
SearchNodePunctuationTest
extends
SearchTestBase
{
public
$test_user
;
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'Search
and node access
'
,
'description'
=>
'Tests search functionality with
node access control
.'
,
'name'
=>
'Search
with punctuation
'
,
'description'
=>
'Tests search functionality with
punctuation
.'
,
'group'
=>
'Search'
,
);
}
...
...
core/modules/search/lib/Drupal/search/Tests/SearchNumberMatchingTest.php
View file @
bf8f70b0
...
...
@@ -2,7 +2,7 @@
/**
* @file
*
Definition of
Drupal\search\Tests\SearchNumberMatchingTest.
*
Contains \
Drupal\search\Tests\SearchNumberMatchingTest.
*/
namespace
Drupal\search\Tests
;
...
...
@@ -10,7 +10,7 @@
use
Drupal\Core\Language\Language
;
/**
* Tests that
numbers can be s
ea
r
ch
ed, with more complex mat
ching.
* Tests that
various number formats match
each
other in sear
ching.
*/
class
SearchNumberMatchingTest
extends
SearchTestBase
{
protected
$test_user
;
...
...
core/modules/search/lib/Drupal/search/Tests/SearchNumbersTest.php
View file @
bf8f70b0
...
...
@@ -2,7 +2,7 @@
/**
* @file
*
Definition of
Drupal\search\Tests\SearchNumbersTest.
*
Contains \
Drupal\search\Tests\SearchNumbersTest.
*/
namespace
Drupal\search\Tests
;
...
...
@@ -10,7 +10,7 @@
use
Drupal\Core\Language\Language
;
/**
* Tests that numbers can be searched.
* Tests that numbers
with different formats
can be searched.
*/
class
SearchNumbersTest
extends
SearchTestBase
{
protected
$test_user
;
...
...
@@ -47,8 +47,8 @@ function setUp() {
'large'
=>
'444444444444444444444444444444444444444'
,
'gigantic'
=>
'5555555555555555555555555555555555555555555555555'
,
'over fifty characters'
=>
'666666666666666666666666666666666666666666666666666666666666'
,
'date'
,
'01/02/2009'
,
'commas'
,
'987,654,321'
,
'date'
=>
'01/02/2009'
,
'commas'
=>
'987,654,321'
,
);
foreach
(
$this
->
numbers
as
$doc
=>
$num
)
{
...
...
core/modules/search/lib/Drupal/search/Tests/SearchPageOverrideTest.php
View file @
bf8f70b0
...
...
@@ -2,13 +2,16 @@
/**
* @file
*
Definition of
Drupal\search\Tests\SearchPageOverrideTest.
*
Contains \
Drupal\search\Tests\SearchPageOverrideTest.
*/
namespace
Drupal\search\Tests
;
/**
* Tests that hook_search_page runs.
* Tests if the result page can be overridden.
*
* Verifies that a plugin can override the buildResults() method to
* control what the search results page looks like.
*/
class
SearchPageOverrideTest
extends
SearchTestBase
{
...
...
@@ -24,7 +27,7 @@ class SearchPageOverrideTest extends SearchTestBase {
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'Search page override'
,
'description'
=>
'Verif
y
that
hook_search_
page can overrid
e search page display
.'
,
'description'
=>
'Verif
ies
that
the result
page can
be
overrid
den
.'
,
'group'
=>
'Search'
,
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment