diff --git a/core/modules/search/src/Tests/SearchAdvancedSearchFormTest.php b/core/modules/search/src/Tests/SearchAdvancedSearchFormTest.php index 21334c3..605bdbb 100644 --- a/core/modules/search/src/Tests/SearchAdvancedSearchFormTest.php +++ b/core/modules/search/src/Tests/SearchAdvancedSearchFormTest.php @@ -13,6 +13,11 @@ * @group search */ class SearchAdvancedSearchFormTest extends SearchTestBase { + /** + * A node to use for testing. + * + * @var \Drupal\ndoe\NodeInterface + */ protected $node; protected function setUp() { diff --git a/core/modules/search/src/Tests/SearchCommentCountToggleTest.php b/core/modules/search/src/Tests/SearchCommentCountToggleTest.php index 5ddfac4..5f2fd43 100644 --- a/core/modules/search/src/Tests/SearchCommentCountToggleTest.php +++ b/core/modules/search/src/Tests/SearchCommentCountToggleTest.php @@ -40,7 +40,7 @@ class SearchCommentCountToggleTest extends SearchTestBase { /** * Array of nodes available to search. * - * @var array + * @var \Drupal\node\NodeInterface[] */ protected $searchableNodes; diff --git a/core/modules/search/src/Tests/SearchCommentTest.php b/core/modules/search/src/Tests/SearchCommentTest.php index 682a659..c15c1ff 100644 --- a/core/modules/search/src/Tests/SearchCommentTest.php +++ b/core/modules/search/src/Tests/SearchCommentTest.php @@ -33,7 +33,7 @@ class SearchCommentTest extends SearchTestBase { protected $commentSubject; /** - * Id for the administrator role. + * ID for the administrator role. * * @var string */ diff --git a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php index afbe245..7d99214 100644 --- a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php +++ b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php @@ -26,14 +26,14 @@ class SearchConfigSettingsFormTest extends SearchTestBase { * * @var \Drupal\user\UserInterface */ - public $searchUser; + protected $searchUser; /** * Node indexed for searching. * * @var \Drupal\node\NodeInterface */ - public $searchNode; + protected $searchNode; protected function setUp() { parent::setUp(); diff --git a/core/modules/search/src/Tests/SearchEmbedFormTest.php b/core/modules/search/src/Tests/SearchEmbedFormTest.php index dac2cfc..62aad4d 100644 --- a/core/modules/search/src/Tests/SearchEmbedFormTest.php +++ b/core/modules/search/src/Tests/SearchEmbedFormTest.php @@ -23,13 +23,17 @@ class SearchEmbedFormTest extends SearchTestBase { /** * Node used for testing. + * + * @var \Drupal\node\NodeInterface */ - public $node; + protected $node; /** * Count of how many times the form has been submitted. + * + * @var integer */ - public $submitCount = 0; + protected $submitCount = 0; protected function setUp() { parent::setUp(); diff --git a/core/modules/search/src/Tests/SearchLanguageTest.php b/core/modules/search/src/Tests/SearchLanguageTest.php index 6a146a1..6376dd0 100644 --- a/core/modules/search/src/Tests/SearchLanguageTest.php +++ b/core/modules/search/src/Tests/SearchLanguageTest.php @@ -27,7 +27,7 @@ class SearchLanguageTest extends SearchTestBase { /** * Array of nodes available to search. * - * @var array + * @var \Drupal\node\NodeInterface[] */ protected $searchableNodes; diff --git a/core/modules/search/src/Tests/SearchMultilingualEntityTest.php b/core/modules/search/src/Tests/SearchMultilingualEntityTest.php index a68e31b..5c4e209 100644 --- a/core/modules/search/src/Tests/SearchMultilingualEntityTest.php +++ b/core/modules/search/src/Tests/SearchMultilingualEntityTest.php @@ -20,7 +20,7 @@ class SearchMultilingualEntityTest extends SearchTestBase { /** * List of searchable nodes. * - * @var array + * @var \Drupal\node\NodeInterface[] */ protected $searchableNodes = array(); diff --git a/core/modules/search/src/Tests/SearchNodePunctuationTest.php b/core/modules/search/src/Tests/SearchNodePunctuationTest.php index 1cc05e4..6f1c91a 100644 --- a/core/modules/search/src/Tests/SearchNodePunctuationTest.php +++ b/core/modules/search/src/Tests/SearchNodePunctuationTest.php @@ -15,9 +15,9 @@ class SearchNodePunctuationTest extends SearchTestBase { /** - * A user with permissions to use advanced search. + * A user with permission to use advanced search. * - * @var object + * @var \Drupal\user\UserInterface */ public $testUser; diff --git a/core/modules/search/src/Tests/SearchNodeUpdateAndDeletionTest.php b/core/modules/search/src/Tests/SearchNodeUpdateAndDeletionTest.php index f02cff1..7a4befb 100644 --- a/core/modules/search/src/Tests/SearchNodeUpdateAndDeletionTest.php +++ b/core/modules/search/src/Tests/SearchNodeUpdateAndDeletionTest.php @@ -21,9 +21,9 @@ class SearchNodeUpdateAndDeletionTest extends SearchTestBase { public static $modules = array(); /** - * A user with permissions to access and search content. + * A user with permission to access and search content. * - * @var object + * @var \Drupal\user\UserInterface */ public $testUser; diff --git a/core/modules/search/src/Tests/SearchNumberMatchingTest.php b/core/modules/search/src/Tests/SearchNumberMatchingTest.php index c918937..748596d 100644 --- a/core/modules/search/src/Tests/SearchNumberMatchingTest.php +++ b/core/modules/search/src/Tests/SearchNumberMatchingTest.php @@ -16,12 +16,37 @@ */ class SearchNumberMatchingTest extends SearchTestBase { /** - * A user with permissions to administer nodes. + * A user with permission to administer nodes. * - * @var object + * @var \Drupal\user\UserInterface */ protected $testUser; - protected $numbers; + + /** + * An array of strings containing numbers to use for testing. + * + * Define a group of numbers that should all match each other -- + * numbers with internal punctuation should match each other, as well + * as numbers with and without leading zeros and leading/trailing + * . and -. + * + * @var string[] + */ + protected $numbers = array( + '123456789', + '12/34/56789', + '12.3456789', + '12-34-56789', + '123,456,789', + '-123456789', + '0123456789', + ); + + /** + * An array of nodes created for testing purposes. + * + * @var \Drupal\node\NodeInterface[] + */ protected $nodes; protected function setUp() { @@ -30,20 +55,6 @@ protected function setUp() { $this->testUser = $this->drupalCreateUser(array('search content', 'access content', 'administer nodes', 'access site reports')); $this->drupalLogin($this->testUser); - // Define a group of numbers that should all match each other -- - // numbers with internal punctuation should match each other, as well - // as numbers with and without leading zeros and leading/trailing - // . and -. - $this->numbers = array( - '123456789', - '12/34/56789', - '12.3456789', - '12-34-56789', - '123,456,789', - '-123456789', - '0123456789', - ); - foreach ($this->numbers as $num) { $info = array( 'body' => array(array('value' => $num)), diff --git a/core/modules/search/src/Tests/SearchNumbersTest.php b/core/modules/search/src/Tests/SearchNumbersTest.php index ea98dd4..18e76ba 100644 --- a/core/modules/search/src/Tests/SearchNumbersTest.php +++ b/core/modules/search/src/Tests/SearchNumbersTest.php @@ -16,12 +16,43 @@ */ class SearchNumbersTest extends SearchTestBase { /** - * A user with permissions to administer nodes. + * A user with permission to administer nodes. * - * @var object + * @var \Drupal\user\UserInterface */ protected $testUser; - protected $numbers; + + /** + * An array containing a series of "numbers" for testing purposes. + * + * Create content with various numbers in it. + * Note: 50 characters is the current limit of the search index's word + * field. + * + * @var string[] + */ + protected $numbers = array( + 'ISBN' => '978-0446365383', + 'UPC' => '036000 291452', + 'EAN bar code' => '5901234123457', + 'negative' => '-123456.7890', + 'quoted negative' => '"-123456.7890"', + 'leading zero' => '0777777777', + 'tiny' => '111', + 'small' => '22222222222222', + 'medium' => '333333333333333333333333333', + 'large' => '444444444444444444444444444444444444444', + 'gigantic' => '5555555555555555555555555555555555555555555555555', + 'over fifty characters' => '666666666666666666666666666666666666666666666666666666666666', + 'date' => '01/02/2009', + 'commas' => '987,654,321', + ); + + /** + * An array of nodes created for testing purposes. + * + * @var \Drupal\node\NodeInterface[] + */ protected $nodes; protected function setUp() { @@ -30,26 +61,6 @@ protected function setUp() { $this->testUser = $this->drupalCreateUser(array('search content', 'access content', 'administer nodes', 'access site reports')); $this->drupalLogin($this->testUser); - // Create content with various numbers in it. - // Note: 50 characters is the current limit of the search index's word - // field. - $this->numbers = array( - 'ISBN' => '978-0446365383', - 'UPC' => '036000 291452', - 'EAN bar code' => '5901234123457', - 'negative' => '-123456.7890', - 'quoted negative' => '"-123456.7890"', - 'leading zero' => '0777777777', - 'tiny' => '111', - 'small' => '22222222222222', - 'medium' => '333333333333333333333333333', - 'large' => '444444444444444444444444444444444444444', - 'gigantic' => '5555555555555555555555555555555555555555555555555', - 'over fifty characters' => '666666666666666666666666666666666666666666666666666666666666', - 'date' => '01/02/2009', - 'commas' => '987,654,321', - ); - foreach ($this->numbers as $doc => $num) { $info = array( 'body' => array(array('value' => $num)), diff --git a/core/modules/search/src/Tests/SearchPageCacheTagsTest.php b/core/modules/search/src/Tests/SearchPageCacheTagsTest.php index 565373e..da975f6 100644 --- a/core/modules/search/src/Tests/SearchPageCacheTagsTest.php +++ b/core/modules/search/src/Tests/SearchPageCacheTagsTest.php @@ -13,13 +13,15 @@ * @group search */ class SearchPageCacheTagsTest extends SearchTestBase { - + /** + * {@inheritdoc} + */ protected $dumpHeaders = TRUE; /** - * A user with permissions to search content. + * A user with permission to search content. * - * @var object + * @var \Drupal\user\UserInterface */ protected $searchingUser; diff --git a/core/modules/search/src/Tests/SearchPageOverrideTest.php b/core/modules/search/src/Tests/SearchPageOverrideTest.php index 33823b2..6817773 100644 --- a/core/modules/search/src/Tests/SearchPageOverrideTest.php +++ b/core/modules/search/src/Tests/SearchPageOverrideTest.php @@ -25,9 +25,9 @@ class SearchPageOverrideTest extends SearchTestBase { public static $modules = array('search_extra_type'); /** - * A user with permissions to administer search. + * A user with permission to administer search. * - * @var object + * @var \Drupal\user\UserInterface */ public $searchUser; diff --git a/core/modules/search/src/Tests/SearchPageTextTest.php b/core/modules/search/src/Tests/SearchPageTextTest.php index fb2d43f..328b685 100644 --- a/core/modules/search/src/Tests/SearchPageTextTest.php +++ b/core/modules/search/src/Tests/SearchPageTextTest.php @@ -17,9 +17,9 @@ */ class SearchPageTextTest extends SearchTestBase { /** - * A user with permissions to use advanced search. + * A user with permission to use advanced search. * - * @var object + * @var \Drupal\user\UserInterface */ protected $searchingUser;