reverted: --- b/core/modules/simpletest/tests/actions.test +++ a/core/modules/simpletest/tests/actions.test @@ -1,13 +1,5 @@ drupalCreateUser(array('administer actions')); @@ -110,9 +103,7 @@ } /** + * Create an infinite loop by causing a watchdog message to be set, - * Loops watchdog messages up to actions_max_stack times. - * - * Creates an infinite loop by causing a watchdog message to be set, * which causes the actions to be triggered again, up to actions_max_stack * times. */ reverted: --- b/core/modules/simpletest/tests/actions_loop_test.install +++ a/core/modules/simpletest/tests/actions_loop_test.install @@ -1,11 +1,6 @@ REQUEST_TIME, ); + // Call the logging hooks to log/process the message - // Calls the logging hooks to log/process the message foreach (module_implements('watchdog') as $module) { module_invoke($module, 'watchdog', $log_entry); } reverted: --- b/core/modules/simpletest/tests/ajax.test +++ a/core/modules/simpletest/tests/ajax.test @@ -1,13 +1,5 @@ 'ajax', '#commands' => $commands); } + /** + * Form to display the Ajax Commands. - * Forms to display the Ajax Commands. * @param $form * @param $form_state * @return unknown_type @@ -265,7 +267,7 @@ } /** + * Ajax callback for 'after'. - * Ajax form callback: Selects 'after'. */ function ajax_forms_test_advanced_commands_after_callback($form, $form_state) { $selector = '#after_div'; @@ -276,7 +278,7 @@ } /** + * Ajax callback for 'alert'. - * Ajax form callback: Selects 'alert'. */ function ajax_forms_test_advanced_commands_alert_callback($form, $form_state) { $commands = array(); @@ -285,7 +287,7 @@ } /** + * Ajax callback for 'append'. - * Ajax form callback: Selects 'append'. */ function ajax_forms_test_advanced_commands_append_callback($form, $form_state) { $selector = '#append_div'; @@ -295,7 +297,7 @@ } /** + * Ajax callback for 'before'. - * Ajax form callback: Selects 'before'. */ function ajax_forms_test_advanced_commands_before_callback($form, $form_state) { $selector = '#before_div'; @@ -306,15 +308,14 @@ } /** + * Ajax callback for 'changed'. - * Ajax form callback: Selects 'changed'. */ function ajax_forms_test_advanced_commands_changed_callback($form, $form_state) { $commands[] = ajax_command_changed('#changed_div'); return array('#type' => 'ajax', '#commands' => $commands); } - /** + * Ajax callback for 'changed' with asterisk marking inner div. - * Ajax form callback: Selects 'changed' with asterisk marking inner div. */ function ajax_forms_test_advanced_commands_changed_asterisk_callback($form, $form_state) { $commands = array(); @@ -323,7 +324,7 @@ } /** + * Ajax callback for 'css'. - * Ajax form callback: Selects 'css'. */ function ajax_forms_test_advanced_commands_css_callback($form, $form_state) { $selector = '#css_div'; @@ -335,7 +336,7 @@ } /** + * Ajax callback for 'data'. - * Ajax form callback: Selects 'data'. */ function ajax_forms_test_advanced_commands_data_callback($form, $form_state) { $selector = '#data_div'; @@ -346,7 +347,7 @@ } /** + * Ajax callback for 'invoke'. - * Ajax form callback: Selects 'invoke'. */ function ajax_forms_test_advanced_commands_invoke_callback($form, $form_state) { $commands = array(); @@ -355,7 +356,7 @@ } /** + * Ajax callback for 'html'. - * Ajax form callback: Selects 'html'. */ function ajax_forms_test_advanced_commands_html_callback($form, $form_state) { $commands = array(); @@ -364,7 +365,7 @@ } /** + * Ajax callback for 'insert'. - * Ajax form callback: Selects 'insert'. */ function ajax_forms_test_advanced_commands_insert_callback($form, $form_state) { $commands = array(); @@ -373,7 +374,7 @@ } /** + * Ajax callback for 'prepend'. - * Ajax form callback: Selects 'prepend'. */ function ajax_forms_test_advanced_commands_prepend_callback($form, $form_state) { $commands = array(); @@ -382,7 +383,7 @@ } /** + * Ajax callback for 'remove'. - * Ajax form callback: Selects 'remove'. */ function ajax_forms_test_advanced_commands_remove_callback($form, $form_state) { $commands = array(); @@ -391,7 +392,7 @@ } /** + * Ajax callback for 'restripe'. - * Ajax form callback: Selects 'restripe'. */ function ajax_forms_test_advanced_commands_restripe_callback($form, $form_state) { $commands = array(); @@ -400,7 +401,7 @@ } /** + * Ajax callback for 'settings'. - * Ajax form callback: Selects 'settings'. */ function ajax_forms_test_advanced_commands_settings_callback($form, $form_state) { $commands = array(); @@ -410,8 +411,6 @@ } /** - * Builds AJAX validation form. - * * This form and its related submit and callback functions demonstrate * not validating another form element when a single Ajax element is triggered. * @@ -449,16 +448,15 @@ return $form; } - /** + * Submit handler for the validation form. - * Submits handler for the validation form. */ function ajax_forms_test_validation_form_submit($form, $form_state) { drupal_set_message(t("Validation form submitted")); } /** + * Ajax callback for the 'drivertext' element of the validation form. - * Ajax form callback: Selects the 'drivertext' element of the validation form. */ function ajax_forms_test_validation_form_callback($form, $form_state) { drupal_set_message("ajax_forms_test_validation_form_callback invoked"); @@ -497,7 +495,7 @@ } /** + * AJAX callback for the ajax_forms_test_lazy_load_form() form. - * AJAX form callback: Selects for the ajax_forms_test_lazy_load_form() form. * * This function returns nothing, because all we're interested in testing is * ajax_render() adding commands for JavaScript and CSS added during the page reverted: --- b/core/modules/simpletest/tests/ajax_test.module +++ a/core/modules/simpletest/tests/ajax_test.module @@ -40,7 +40,7 @@ } /** + * Menu callback; Return an element suitable for use by ajax_deliver(). - * Menu callback: Returns an element suitable for use by ajax_deliver(). * * Additionally ensures that ajax_render() incorporates JavaScript settings * generated during the page request by invoking drupal_add_js() with a dummy @@ -52,7 +52,7 @@ } /** + * Menu callback; Returns Ajax element with #error property set. - * Menu callback: Returns Ajax element with #error property set. */ function ajax_test_error() { $message = ''; @@ -63,7 +63,7 @@ } /** + * Menu callback; Renders a #type link with #ajax. - * Menu callback: Renders a #type link with #ajax. */ function ajax_test_link() { $build['link'] = array( @@ -76,3 +76,4 @@ ); return $build; } + reverted: --- b/core/modules/simpletest/tests/batch.test +++ a/core/modules/simpletest/tests/batch.test @@ -22,7 +22,7 @@ } /** + * Test batches triggered outside of form submission. - * Tests batches triggered outside of form submission. */ function testBatchNoForm() { // Displaying the page triggers batch 1. @@ -33,7 +33,7 @@ } /** + * Test batches defined in a form submit handler. - * Tests batches defined in a form submit handler. */ function testBatchForm() { // Batch 0: no operation. @@ -72,7 +72,7 @@ } /** + * Test batches defined in a multistep form. - * Tests batches defined in a multistep form. */ function testBatchFormMultistep() { $this->drupalGet('batch-test/multistep'); @@ -92,7 +92,7 @@ } /** + * Test batches defined in different submit handlers on the same form. - * Tests batches defined in different submit handlers on the same form. */ function testBatchFormMultipleBatches() { // Batches 1, 2 and 3 are triggered in sequence by different submit @@ -109,7 +109,7 @@ } /** + * Test batches defined in a programmatically submitted form. - * Tests batches defined in a programmatically submitted form. * * Same as above, but the form is submitted through drupal_form_execute(). */ @@ -127,7 +127,7 @@ } /** + * Test that drupal_form_submit() can run within a batch operation. - * Tests that drupal_form_submit() can run within a batch operation. */ function testDrupalFormSubmitInBatch() { // Displaying the page triggers a batch that programmatically submits a @@ -138,7 +138,7 @@ } /** + * Test batches that return $context['finished'] > 1 do in fact complete. - * Tests batches that return $context['finished'] > 1 do in fact complete. * See http://drupal.org/node/600836 */ function testBatchLargePercentage() { @@ -151,7 +151,7 @@ /** + * Will trigger a pass if the texts were found in order in the raw content. - * Triggers a pass if the texts were found in order in the raw content. * * @param $texts * Array of raw strings to look for . @@ -166,7 +166,7 @@ } /** + * Helper function: return expected execution stacks for the test batches. - * Returns expected execution stacks for the test batches. */ function _resultStack($id, $value = 0) { $stack = array(); @@ -233,7 +233,7 @@ } /** + * Helper function: return expected result messages for the test batches. - * Returns expected result messages for the test batches. */ function _resultMessages($id) { $messages = array(); @@ -384,7 +384,7 @@ } /** + * Test the _batch_api_percentage() function. - * Tests the _batch_api_percentage() function. */ function testBatchPercentages() { foreach ($this->testCases as $expected_result => $arguments) { reverted: --- b/core/modules/simpletest/tests/batch_test.callbacks.inc +++ a/core/modules/simpletest/tests/batch_test.callbacks.inc @@ -1,12 +1,13 @@ oldserver; drupal_static_reset('ip_address'); @@ -47,7 +36,7 @@ } /** + * test IP Address and hostname - * Tests IP Address and hostname. */ function testIPAddressHost() { // Test the normal IP address. @@ -109,9 +98,6 @@ } } -/** - * Enables and tests the page cache. - */ class BootstrapPageCacheTestCase extends DrupalWebTestCase { public static function getInfo() { @@ -130,7 +116,7 @@ } /** + * Test support for requests containing If-Modified-Since and If-None-Match headers. - * Tests support of requests with If-Modified-Since and If-None-Match headers. */ function testConditionalRequests() { $config = config('system.performance'); @@ -170,7 +156,7 @@ } /** + * Test cache headers. - * Tests cache headers. */ function testPageCache() { $config = config('system.performance'); @@ -212,7 +198,7 @@ } /** + * Test page compression. - * Tests page compression. * * The test should pass even if zlib.output_compression is enabled in php.ini, * .htaccess or similar, or if compression is done outside PHP, e.g. by the @@ -245,9 +231,6 @@ } } -/** - * Tests the variable system. - */ class BootstrapVariableTestCase extends DrupalWebTestCase { function setUp() { @@ -263,7 +246,7 @@ } /** + * testVariable - * Tests variables then deletes them. */ function testVariable() { // Setting and retrieving values. @@ -296,7 +279,7 @@ } /** + * Test hook_boot() and hook_exit(). - * Tests hook_boot() and hook_exit(). */ class HookBootExitTestCase extends DrupalWebTestCase { @@ -313,7 +296,7 @@ } /** + * Test calling of hook_boot() and hook_exit(). - * Tests calling of hook_boot() and hook_exit(). */ function testHookBootExit() { // Test with cache disabled. Boot and exit should always fire. @@ -351,7 +334,7 @@ } /** + * Test drupal_get_filename()'s availability. - * Tests drupal_get_filename()'s availability. */ class BootstrapGetFilenameTestCase extends DrupalUnitTestCase { @@ -364,7 +347,7 @@ } /** + * Test that drupal_get_filename() works correctly when the file is not found in the database. - * Tests that drupal_get_filename() works when the file is not in database. */ function testDrupalGetFilename() { // Reset the static cache so we can test the "db is not active" code of @@ -395,9 +378,6 @@ } } -/** - * Tests that the timer_read() is working correctly. - */ class BootstrapTimerTestCase extends DrupalUnitTestCase { public static function getInfo() { @@ -409,8 +389,8 @@ } /** + * Test timer_read() to ensure it properly accumulates time when the timer + * started and stopped multiple times. - * Tests timer_read() to ensure it properly accumulates time when the timer - * is started and stopped multiple times. * @return */ function testTimer() { @@ -431,7 +411,7 @@ } /** + * Test that resetting static variables works. - * Tests that resetting static variables works. */ class BootstrapResettableStaticTestCase extends DrupalUnitTestCase { @@ -444,7 +424,7 @@ } /** + * Test that a variable reference returned by drupal_static() gets reset when - * Tests that a variable reference returned by drupal_static() gets reset when * drupal_static_reset() is called. */ function testDrupalStatic() { @@ -470,7 +450,7 @@ } /** + * Test miscellaneous functions in bootstrap.inc. - * Tests miscellaneous functions in bootstrap.inc. */ class BootstrapMiscTestCase extends DrupalUnitTestCase { @@ -483,7 +463,7 @@ } /** + * Test miscellaneous functions in bootstrap.inc. - * Tests miscellaneous functions in bootstrap.inc. */ function testMisc() { // Test drupal_array_merge_deep(). @@ -507,7 +487,7 @@ } /** + * Test providing a direct URL to to drupal_override_server_variables(). - * Tests providing a direct URL to to drupal_override_server_variables(). */ function testDrupalOverrideServerVariablesProvidedURL() { $tests = array( reverted: --- b/core/modules/simpletest/tests/cache.test +++ a/core/modules/simpletest/tests/cache.test @@ -1,20 +1,12 @@ checkVariable($this->randomName(100)); } /** + * Test the saving and restoring of an integer. - * Tests the saving and restoring of an integer. */ function testInteger() { $this->checkVariable(100); } /** + * Test the saving and restoring of a double. - * Tests the saving and restoring of a double. */ function testDouble() { $this->checkVariable(1.29); } /** + * Test the saving and restoring of an array. - * Tests the saving and restoring of an array. */ function testArray() { $this->checkVariable(array('drupal1', 'drupal2' => 'drupal3', 'drupal4' => array('drupal5', 'drupal6'))); } /** + * Test the saving and restoring of an object. - * Tests the saving and restoring of an object. */ function testObject() { $test_object = new stdClass(); @@ -166,7 +155,7 @@ } /** + * Check or a variable is stored and restored properly. - * Checks that a variable is stored and restored properly. */ function checkVariable($var) { cache()->set('test_var', $var); @@ -175,7 +164,7 @@ } /** + * Test no empty cids are written in cache table. - * Tests no empty cids are written in cache table. */ function testNoEmptyCids() { $this->drupalGet('user/register'); @@ -184,7 +173,7 @@ } /** + * Test getMultiple(). - * Tests getMultiple(). */ class CacheGetMultipleUnitTest extends CacheTestCase { @@ -202,7 +191,7 @@ } /** + * Test getMultiple(). - * Tests getMultiple(). */ function testCacheMultiple() { $item1 = $this->randomName(10); @@ -232,7 +221,7 @@ } /** + * Test cache clearing methods. - * Tests cache clearing methods. */ class CacheClearCase extends CacheTestCase { public static function getInfo() { @@ -251,7 +240,7 @@ } /** + * Test clearing using a cid. - * Tests clearing using a cid. */ function testClearCid() { $cache = cache($this->default_bin); @@ -264,7 +253,7 @@ } /** + * Test clearing using wildcard. - * Tests clearing using wildcard. */ function testClearWildcard() { $cache = cache($this->default_bin); @@ -290,7 +279,7 @@ } /** + * Test clearing using an array. - * Tests clearing using an array. */ function testClearArray() { // Create three cache entries. @@ -328,7 +317,7 @@ } /** + * Test drupal_flush_all_caches(). - * Tests drupal_flush_all_caches(). */ function testFlushAllCaches() { // Create cache entries for each flushed cache bin. @@ -349,7 +338,7 @@ } /** + * Test minimum cache lifetime. - * Tests minimum cache lifetime. */ function testMinimumCacheLifetime() { // Set a minimum/maximum cache lifetime. @@ -384,7 +373,7 @@ } /** + * Test isEmpty() method. - * Tests isEmpty() method. */ class CacheIsEmptyCase extends CacheTestCase { public static function getInfo() { @@ -403,7 +392,7 @@ } /** + * Test clearing using a cid. - * Tests clearing using a cid. */ function testIsEmpty() { // Clear the cache bin. reverted: --- b/core/modules/simpletest/tests/common.test +++ a/core/modules/simpletest/tests/common.test @@ -21,12 +21,6 @@ parent::setUp(array('block', 'common_test')); } - /** - * Tests if the theme has been altered. - * - * @global string $theme - * @global array $base_theme_info - */ function testDrupalAlter() { // This test depends on Bartik, so make sure that it is always the current // active theme. @@ -89,7 +83,7 @@ } /** + * Confirm that invalid text given as $path is filtered. - * Confirms that invalid text given as $path is filtered. */ function testLXSS() { $text = $this->randomName(); @@ -122,7 +116,7 @@ } /** + * Test drupal_get_query_parameters(). - * Tests drupal_get_query_parameters(). */ function testDrupalGetQueryParameters() { $original = array( @@ -169,7 +163,7 @@ } /** + * Test drupal_http_build_query(). - * Tests drupal_http_build_query(). */ function testDrupalHttpBuildQuery() { $this->assertEqual(drupal_http_build_query(array('a' => ' &#//+%20@۞')), 'a=%20%26%23//%2B%2520%40%DB%9E', t('Value was properly encoded.')); @@ -179,7 +173,7 @@ } /** + * Test drupal_parse_url(). - * Tests drupal_parse_url(). */ function testDrupalParseUrl() { // Relative URL. @@ -247,9 +241,7 @@ } /** + * Test url() with/without query, with/without fragment, absolute on/off and - * Tests url() functionality. - * - * Tests url() with/without query, with/without fragment, absolute on/off and * assert all that works when clean URLs are on and off. */ function testUrl() { @@ -325,7 +317,7 @@ } /** + * Test external URL handling. - * Tests external URL handling. */ function testExternalUrls() { $test_url = 'http://drupal.org/'; @@ -374,7 +366,7 @@ } /** + * Check that invalid multi-byte sequences are rejected. - * Checks that invalid multi-byte sequences are rejected. */ function testInvalidMultiByte() { // Ignore PHP 5.3+ invalid multibyte sequence warning. @@ -392,7 +384,7 @@ } /** + * Check that special characters are escaped. - * Checks that special characters are escaped. */ function testEscaping() { $text = check_plain("