summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJennifer Hodgdon2012-10-17 16:46:44 (GMT)
committerJennifer Hodgdon2012-10-17 16:46:44 (GMT)
commitfc3cd2665b7a96ddcb94757d39e7a0bf8808cbf1 (patch)
treeffa1d3355ae784ecfcd027940756aa4a91cf3670
parentdeab5f5173d81e7c1d04844719abceae9323c246 (diff)
Issue #1431658 by Albert Volkman, kid_icarus, ChinggizKhan, xjm, rgristroph, connork: Clean up API docs for many system tests
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Ajax/FormValuesTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php10
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Ajax/MultiFormTest.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Batch/ProcessingTest.php3
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Cache/DatabaseBackendUnitTest.php12
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Cache/GenericCacheBackendUnitTestBase.php21
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Cache/MemoryBackendUnitTest.php6
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Common/AddFeedTest.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Common/HtmlIdentifierUnitTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Common/SchemaTest.php27
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Common/SimpleTestErrorCollectorTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Common/TableSortExtenderUnitTest.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php11
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Database/DeleteTruncateTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Database/InsertLobTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Database/InsertTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Database/MergeTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Database/SelectComplexTest.php3
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Database/SelectSubqueryTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Database/SelectTableSortDefaultTest.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Database/SelectTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Database/UpdateTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Theme/RegistryTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Update/DependencyHookInvocationTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Update/DependencyOrderingTest.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Update/UpdateScriptTest.php2
33 files changed, 102 insertions, 53 deletions
diff --git a/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php
index dd3ef46..a196f85 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxTestBase.php
@@ -10,7 +10,7 @@ namespace Drupal\system\Tests\Ajax;
use Drupal\simpletest\WebTestBase;
/**
- * Base test system for AJAX tests.
+ * Provides a base class for Ajax tests.
*/
abstract class AjaxTestBase extends WebTestBase {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Ajax/FormValuesTest.php b/core/modules/system/lib/Drupal/system/Tests/Ajax/FormValuesTest.php
index 0ea8abf..9abc495 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Ajax/FormValuesTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Ajax/FormValuesTest.php
@@ -27,7 +27,7 @@ class FormValuesTest extends AjaxTestBase {
}
/**
- * Submits forms with select and checkbox elements via AJAX.
+ * Submits forms with select and checkbox elements via Ajax.
*/
function testSimpleAjaxFormValue() {
// Verify form values of a select element.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php b/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php
index 204701f..00e7f14 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php
@@ -69,7 +69,7 @@ class FrameworkTest extends AjaxTestBase {
}
/**
- * Tests that new JavaScript and CSS files are returned on an AJAX request.
+ * Tests that new JavaScript and CSS files are returned on an Ajax request.
*/
function testLazyLoad() {
$expected = array(
@@ -103,7 +103,7 @@ class FrameworkTest extends AjaxTestBase {
$this->assertTrue(!isset($original_settings[$expected['css']]), format_string('Page originally lacks the %css file, as expected.', array('%css' => $expected['css'])));
$this->assertTrue(!isset($original_settings[$expected['js']]), format_string('Page originally lacks the %js file, as expected.', array('%js' => $expected['js'])));
- // Submit the AJAX request without triggering files getting added.
+ // Submit the Ajax request without triggering files getting added.
$commands = $this->drupalPostAJAX(NULL, array('add_files' => FALSE), array('op' => t('Submit')));
$new_settings = $this->drupalGetSettings();
@@ -124,7 +124,7 @@ class FrameworkTest extends AjaxTestBase {
$this->assertFalse($found_settings_command, format_string('Page state still lacks the %css and %js files, as expected.', array('%css' => $expected['css'], '%js' => $expected['js'])));
$this->assertFalse($found_markup_command, format_string('Page still lacks the %css and %js files, as expected.', array('%css' => $expected['css'], '%js' => $expected['js'])));
- // Submit the AJAX request and trigger adding files.
+ // Submit the Ajax request and trigger adding files.
$commands = $this->drupalPostAJAX(NULL, array('add_files' => TRUE), array('op' => t('Submit')));
$new_settings = $this->drupalGetSettings();
$new_css = $new_settings['ajaxPageState']['css'];
@@ -134,12 +134,12 @@ class FrameworkTest extends AjaxTestBase {
$this->assertIdentical($new_settings[$expected['setting_name']], $expected['setting_value'], format_string('Page now has the %setting.', array('%setting' => $expected['setting_name'])));
// Verify the expected CSS file was added, both to Drupal.settings, and as
- // an AJAX command for inclusion into the HTML.
+ // an Ajax command for inclusion into the HTML.
$this->assertEqual($new_css, $original_css + array($expected['css'] => 1), format_string('Page state now has the %css file.', array('%css' => $expected['css'])));
$this->assertCommand($commands, array('data' => $expected_css_html), format_string('Page now has the %css file.', array('%css' => $expected['css'])));
// Verify the expected JS file was added, both to Drupal.settings, and as
- // an AJAX command for inclusion into the HTML. By testing for an exact HTML
+ // an Ajax command for inclusion into the HTML. By testing for an exact HTML
// string containing the SCRIPT tag, we also ensure that unexpected
// JavaScript code, such as a jQuery.extend() that would potentially clobber
// rather than properly merge settings, didn't accidentally get added.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Ajax/MultiFormTest.php b/core/modules/system/lib/Drupal/system/Tests/Ajax/MultiFormTest.php
index cf3adaa..aab0858 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Ajax/MultiFormTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Ajax/MultiFormTest.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Tests\Ajax;
/**
- * Tests that Ajax-enabled forms work when multiple instances of the same form are on a page.
+ * Tests Ajax-enabled forms functionality with multiple instances of the form.
*/
class MultiFormTest extends AjaxTestBase {
@@ -53,7 +53,7 @@ class MultiFormTest extends AjaxTestBase {
}
/**
- * Tests that pages with the 'page_node_form' included twice works correctly.
+ * Tests that pages with the 'page_node_form' included twice work correctly.
*/
function testMultiForm() {
// HTML IDs for elements within the field are potentially modified with
diff --git a/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php b/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php
index 69dee9c..db1d671 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Batch/PageTest.php
@@ -10,7 +10,7 @@ namespace Drupal\system\Tests\Batch;
use Drupal\simpletest\WebTestBase;
/**
- * Tests for the Batch API Progress page.
+ * Tests the Batch API Progress page.
*/
class PageTest extends WebTestBase {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Batch/ProcessingTest.php b/core/modules/system/lib/Drupal/system/Tests/Batch/ProcessingTest.php
index 2f56ecd..9bd0c61 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Batch/ProcessingTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Batch/ProcessingTest.php
@@ -10,7 +10,7 @@ namespace Drupal\system\Tests\Batch;
use Drupal\simpletest\WebTestBase;
/**
- * Tests for the Batch API.
+ * Tests the Batch API.
*/
class ProcessingTest extends WebTestBase {
@@ -166,6 +166,7 @@ class ProcessingTest extends WebTestBase {
* Array of raw strings to look for .
* @param $message
* Message to display.
+ *
* @return
* TRUE on pass, FALSE on fail.
*/
diff --git a/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php b/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php
index 9e662c9..3fa0d1d 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Bundle/BundleTest.php
@@ -10,7 +10,7 @@ namespace Drupal\system\Tests\Bundle;
use Drupal\simpletest\WebTestBase;
/**
- * Test bundle registration to the DIC.
+ * Tests bundle registration to the DIC.
*/
class BundleTest extends WebTestBase {
@@ -30,7 +30,7 @@ class BundleTest extends WebTestBase {
}
/**
- * Test that services provided by module bundles get registered to the DIC.
+ * Tests that services provided by module bundles get registered to the DIC.
*/
function testBundleRegistration() {
$this->assertTrue(drupal_container()->getDefinition('file.usage')->getClass() == 'Drupal\\bundle_test\\TestFileUsage', 'Class has been changed');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php
index 6f9c269..25ab106 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Cache/CacheTestBase.php
@@ -41,7 +41,7 @@ abstract class CacheTestBase extends WebTestBase {
}
/**
- * Assert or a cache entry exists.
+ * Asserts that a cache entry exists.
*
* @param $message
* Message to display.
@@ -67,7 +67,7 @@ abstract class CacheTestBase extends WebTestBase {
}
/**
- * Assert or a cache entry has been removed.
+ * Asserts that a cache entry has been removed.
*
* @param $message
* Message to display.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/DatabaseBackendUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Cache/DatabaseBackendUnitTest.php
index 585a3ff..f301257 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Cache/DatabaseBackendUnitTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Cache/DatabaseBackendUnitTest.php
@@ -22,14 +22,26 @@ class DatabaseBackendUnitTest extends GenericCacheBackendUnitTestBase {
);
}
+ /**
+ * Creates a new instance of DatabaseBackend.
+ *
+ * @return
+ * A new DatabaseBackend object.
+ */
protected function createCacheBackend($bin) {
return new DatabaseBackend($bin);
}
+ /**
+ * Installs system schema.
+ */
public function setUpCacheBackend() {
drupal_install_schema('system');
}
+ /**
+ * Uninstalls system schema.
+ */
public function tearDownCacheBackend() {
drupal_uninstall_schema('system');
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/GenericCacheBackendUnitTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Cache/GenericCacheBackendUnitTestBase.php
index c54943f..95805d7 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Cache/GenericCacheBackendUnitTestBase.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Cache/GenericCacheBackendUnitTestBase.php
@@ -13,8 +13,10 @@ use Drupal\simpletest\UnitTestBase;
use stdClass;
/**
+ * Tests any cache backend.
+ *
* Full generic unit test suite for any cache backend. In order to use it for a
- * cache backend implementation extend this class and override the
+ * cache backend implementation, extend this class and override the
* createBackendInstace() method to return an object.
*
* @see DatabaseBackendUnitTestCase
@@ -44,7 +46,7 @@ abstract class GenericCacheBackendUnitTestBase extends UnitTestBase {
protected $defaultValue;
/**
- * Get testing bin.
+ * Gets the testing bin.
*
* Override this method if you want to work on a different bin than the
* default one.
@@ -60,7 +62,7 @@ abstract class GenericCacheBackendUnitTestBase extends UnitTestBase {
}
/**
- * Create a cache backend to test.
+ * Creates a cache backend to test.
*
* Override this method to test a CacheBackend.
*
@@ -73,21 +75,22 @@ abstract class GenericCacheBackendUnitTestBase extends UnitTestBase {
protected abstract function createCacheBackend($bin);
/**
- * Allow specific implementation to change the environement before test run.
+ * Allows specific implementation to change the environment before a test run.
*/
public function setUpCacheBackend() {
}
/**
- * Allow specific implementation to alter the environement after test run but
- * before the real tear down, which will changes things such as the database
- * prefix.
+ * Allows alteration of environment after a test run but before tear down.
+ *
+ * Used before the real tear down because the tear down will change things
+ * such as the database prefix.
*/
public function tearDownCacheBackend() {
}
/**
- * Get backend to test, this will get a shared instance set in the object.
+ * Gets a backend to test; this will get a shared instance set in the object.
*
* @return Drupal\Core\Cache\CacheBackendInterface
* Cache backend to test.
@@ -335,7 +338,7 @@ abstract class GenericCacheBackendUnitTestBase extends UnitTestBase {
}
/**
- * Test Drupal\Core\Cache\CacheBackendInterface::flush().
+ * Tests Drupal\Core\Cache\CacheBackendInterface::flush().
*/
public function testFlush() {
$backend = $this->getCacheBackend();
diff --git a/core/modules/system/lib/Drupal/system/Tests/Cache/MemoryBackendUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Cache/MemoryBackendUnitTest.php
index 499ddaf..d3a29e3 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Cache/MemoryBackendUnitTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Cache/MemoryBackendUnitTest.php
@@ -22,6 +22,12 @@ class MemoryBackendUnitTest extends GenericCacheBackendUnitTestBase {
);
}
+ /**
+ * Creates a new instance of MemoryBackend.
+ *
+ * @return
+ * A new MemoryBackend object.
+ */
protected function createCacheBackend($bin) {
return new MemoryBackend($bin);
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/AddFeedTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/AddFeedTest.php
index 87e1731..e23525e 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/AddFeedTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/AddFeedTest.php
@@ -91,7 +91,9 @@ class AddFeedTest extends WebTestBase {
}
/**
- * Check that special characters are correctly escaped. Test for issue #1211668.
+ * Checks that special characters are correctly escaped.
+ *
+ * @see http://drupal.org/node/1211668
*/
function testFeedIconEscaping() {
$variables = array();
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php
index db0303c..9009bbb 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php
@@ -82,7 +82,7 @@ class CascadingStylesheetsTest extends WebTestBase {
}
/**
- * Makes sure that reseting the CSS empties the cache.
+ * Makes sure that resetting the CSS empties the cache.
*/
function testReset() {
drupal_static_reset('drupal_add_css');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
index 87d97b6..d3cd9e6 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
@@ -74,7 +74,7 @@ class FormatDateTest extends WebTestBase {
}
/**
- * Tests for the format_date() function.
+ * Tests the format_date() function.
*/
function testFormatDate() {
global $user;
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/HtmlIdentifierUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/HtmlIdentifierUnitTest.php
index d0daf38..df4046c 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/HtmlIdentifierUnitTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/HtmlIdentifierUnitTest.php
@@ -10,7 +10,7 @@ namespace Drupal\system\Tests\Common;
use Drupal\simpletest\UnitTestBase;
/**
- * Test for cleaning HTML identifiers.
+ * Tests cleaning HTML identifiers.
*/
class HtmlIdentifierUnitTest extends UnitTestBase {
public static function getInfo() {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/SchemaTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/SchemaTest.php
index c33d59a..7c328b4 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/SchemaTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/SchemaTest.php
@@ -13,9 +13,10 @@ use Drupal\simpletest\WebTestBase;
use Exception;
/**
- * Unit tests for the Schema API.
+ * Tests the Schema API.
*/
class SchemaTest extends WebTestBase {
+
/**
* A global counter for table and field creation.
*/
@@ -30,7 +31,7 @@ class SchemaTest extends WebTestBase {
}
/**
- *
+ * Tests database interactions.
*/
function testSchema() {
// Try creating a table.
@@ -144,6 +145,15 @@ class SchemaTest extends WebTestBase {
$this->assertTrue(db_table_exists('test_timestamp'), 'Table with database specific datatype was created.');
}
+ /**
+ * Tests inserting data into an existing table.
+ *
+ * @param $table
+ * The database table to insert data into.
+ *
+ * @return
+ * TRUE if the insert succeeded, FALSE otherwise.
+ */
function tryInsert($table = 'test_table') {
try {
db_insert($table)
@@ -209,11 +219,12 @@ class SchemaTest extends WebTestBase {
* Tries to insert a negative value into columns defined as unsigned.
*
* @param $table_name
- * The table to insert
+ * The table to insert.
* @param $column_name
- * The column to insert
+ * The column to insert.
+ *
* @return
- * TRUE if the insert succeeded, FALSE otherwise
+ * TRUE if the insert succeeded, FALSE otherwise.
*/
function tryUnsignedInsert($table_name, $column_name) {
try {
@@ -228,7 +239,7 @@ class SchemaTest extends WebTestBase {
}
/**
- * Test adding columns to an existing table.
+ * Tests adding columns to an existing table.
*/
function testSchemaAddField() {
// Test varchar types.
@@ -300,7 +311,7 @@ class SchemaTest extends WebTestBase {
}
/**
- * Assert that a given field can be added and removed from a table.
+ * Asserts that a given field can be added and removed from a table.
*
* The addition test covers both defining a field of a given specification
* when initially creating at table and extending an existing table.
@@ -357,7 +368,7 @@ class SchemaTest extends WebTestBase {
}
/**
- * Assert that a newly added field has the correct characteristics.
+ * Asserts that a newly added field has the correct characteristics.
*/
protected function assertFieldCharacteristics($table_name, $field_name, $field_spec) {
// Check that the initial value has been registered.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/SimpleTestErrorCollectorTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/SimpleTestErrorCollectorTest.php
index c8a08ba..16c62fc 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/SimpleTestErrorCollectorTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/SimpleTestErrorCollectorTest.php
@@ -61,7 +61,7 @@ class SimpleTestErrorCollectorTest extends WebTestBase {
}
/**
- * Error handler that collects errors in an array.
+ * Stores errors into an array.
*
* This test class is trying to verify that simpletest correctly sees errors
* and warnings. However, it can't generate errors and warnings that
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/TableSortExtenderUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/TableSortExtenderUnitTest.php
index 9a39cfc..c7cc2a9 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/TableSortExtenderUnitTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/TableSortExtenderUnitTest.php
@@ -10,7 +10,7 @@ namespace Drupal\system\Tests\Common;
use Drupal\simpletest\UnitTestBase;
/**
- * Test unicode handling features implemented in unicode.inc.
+ * Tests unicode handling features implemented in unicode.inc.
*/
class TableSortExtenderUnitTest extends UnitTestBase {
@@ -44,7 +44,7 @@ class TableSortExtenderUnitTest extends UnitTestBase {
}
/**
- * Test tablesort_init().
+ * Tests tablesort_init().
*/
function testTableSortInit() {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php
index 473e352..39ed2b4 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php
@@ -53,6 +53,17 @@ class UrlTest extends WebTestBase {
$this->assertTrue($this->hasClass($link, 'active'), format_string('Class @class is present on link to the current page', array('@class' => 'active')));
}
+ /**
+ * Checks for class existence in link.
+ *
+ * @param $link
+ * URL to search.
+ * @param $class
+ * Element class to search for.
+ *
+ * @return bool
+ * TRUE if the class is found, FALSE otherwise.
+ */
private function hasClass($link, $class) {
return preg_match('|class="([^\"\s]+\s+)*' . $class . '|', $link);
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/DeleteTruncateTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/DeleteTruncateTest.php
index e31ac2c..3d72da1 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/DeleteTruncateTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/DeleteTruncateTest.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Tests\Database;
/**
- * Delete/Truncate tests.
+ * Tests delete and truncate queries.
*
* The DELETE tests are not as extensive, as all of the interesting code for
* DELETE queries is in the conditional which is identical to the UPDATE and
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/InsertLobTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/InsertLobTest.php
index 36fd72b..63ffd29 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/InsertLobTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/InsertLobTest.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Tests\Database;
/**
- * Insert tests using LOB fields, which are weird on some databases.
+ * Tests inserts using LOB fields, which are weird on some databases.
*/
class InsertLobTest extends DatabaseTestBase {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/InsertTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/InsertTest.php
index ffaeee0..76afcf8 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/InsertTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/InsertTest.php
@@ -128,7 +128,7 @@ class InsertTest extends DatabaseTestBase {
}
/**
- * Test that inserts return the proper auto-increment ID.
+ * Tests that inserts return the proper auto-increment ID.
*/
function testInsertLastInsertID() {
$id = db_insert('test')
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/MergeTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/MergeTest.php
index c9e5637..d5d6909 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/MergeTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/MergeTest.php
@@ -98,7 +98,7 @@ class MergeTest extends DatabaseTestBase {
}
/**
- * Confirms that we can merge-update a record successfully, with alternate replacement.
+ * Confirms that we can merge-update a record, with alternate replacement.
*/
function testMergeUpdateExplicit() {
$num_records_before = db_query('SELECT COUNT(*) FROM {test_people}')->fetchField();
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/SelectComplexTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/SelectComplexTest.php
index 6476f1e..643b036 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/SelectComplexTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/SelectComplexTest.php
@@ -204,6 +204,9 @@ class SelectComplexTest extends DatabaseTestBase {
$this->assertEqual($record->$age_field, 27, 'Correct data retrieved.');
}
+ /**
+ * Tests having queries.
+ */
function testHavingCountQuery() {
$query = db_select('test')
->extend('Drupal\Core\Database\Query\PagerSelectExtender')
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/SelectSubqueryTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/SelectSubqueryTest.php
index d36c962..544c7b1 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/SelectSubqueryTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/SelectSubqueryTest.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Tests\Database;
/**
- * Test case for subselects in a dynamic SELECT query.
+ * Tests for subselects in a dynamic SELECT query.
*/
class SelectSubqueryTest extends DatabaseTestBase {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/SelectTableSortDefaultTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/SelectTableSortDefaultTest.php
index a848947..c740292 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/SelectTableSortDefaultTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/SelectTableSortDefaultTest.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Tests\Database;
/**
- * Tests the tablesort query extender
+ * Tests the tablesort query extender.
*/
class SelectTableSortDefaultTest extends DatabaseTestBase {
@@ -77,7 +77,7 @@ class SelectTableSortDefaultTest extends DatabaseTestBase {
}
/**
- * Confirms that no error is thrown if a sort is not set in a default tableselect.
+ * Confirms that no error is thrown if no sort is set in a tableselect.
*/
function testTableSortDefaultSort() {
$this->drupalGet('database_test/tablesort_default_sort');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/SelectTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/SelectTest.php
index 802aef3..85787b8 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/SelectTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/SelectTest.php
@@ -368,7 +368,7 @@ class SelectTest extends DatabaseTestBase {
}
/**
- * Tests that aliases are renamed when duplicates.
+ * Tests that aliases are renamed when they are duplicates.
*/
function testSelectDuplicateAlias() {
$query = db_select('test', 't');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/UpdateTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/UpdateTest.php
index 1558a92..c5acd78 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/UpdateTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/UpdateTest.php
@@ -8,7 +8,7 @@
namespace Drupal\system\Tests\Database;
/**
- * Updates builder tests.
+ * Tests the update query builder.
*/
class UpdateTest extends DatabaseTestBase {
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php
index 3d0188d..0c7ee72 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php
@@ -10,7 +10,7 @@ namespace Drupal\system\Tests\System;
use Drupal\simpletest\WebTestBase;
/**
- * Tests for the theme interface functionality.
+ * Tests the theme interface functionality.
*/
class ThemeTest extends WebTestBase {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/RegistryTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/RegistryTest.php
index 3d47b89..7ea187f 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/RegistryTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/RegistryTest.php
@@ -11,7 +11,7 @@ use Drupal\simpletest\WebTestBase;
use Drupal\Core\Utility\ThemeRegistry;
/**
- * Tests for the ThemeRegistry class.
+ * Tests the ThemeRegistry class.
*/
class RegistryTest extends WebTestBase {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Update/DependencyHookInvocationTest.php b/core/modules/system/lib/Drupal/system/Tests/Update/DependencyHookInvocationTest.php
index 7b03fde..ec8b468 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Update/DependencyHookInvocationTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Update/DependencyHookInvocationTest.php
@@ -10,7 +10,7 @@ namespace Drupal\system\Tests\Update;
use Drupal\simpletest\WebTestBase;
/**
- * Tests for the invocation of hook_update_dependencies().
+ * Tests the invocation of hook_update_dependencies().
*/
class DependencyHookInvocationTest extends WebTestBase {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Update/DependencyOrderingTest.php b/core/modules/system/lib/Drupal/system/Tests/Update/DependencyOrderingTest.php
index 6bd1534..f1d232f 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Update/DependencyOrderingTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Update/DependencyOrderingTest.php
@@ -10,7 +10,7 @@ namespace Drupal\system\Tests\Update;
use Drupal\simpletest\WebTestBase;
/**
- * Tests for the update dependency ordering system.
+ * Tests the update dependency ordering system.
*/
class DependencyOrderingTest extends WebTestBase {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Update/UpdateScriptTest.php b/core/modules/system/lib/Drupal/system/Tests/Update/UpdateScriptTest.php
index f3275a7..e2201df 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Update/UpdateScriptTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Update/UpdateScriptTest.php
@@ -10,7 +10,7 @@ namespace Drupal\system\Tests\Update;
use Drupal\simpletest\WebTestBase;
/**
- * Tests for the update system functionality.
+ * Tests the update system functionality.
*/
class UpdateScriptTest extends WebTestBase {