summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/drupal_web_test_case.php24
-rw-r--r--modules/simpletest/simpletest.api.php2
-rw-r--r--modules/simpletest/simpletest.info7
-rw-r--r--modules/simpletest/tests/ajax_forms_test.module4
-rw-r--r--modules/simpletest/tests/common.test49
-rw-r--r--modules/simpletest/tests/database_test.test19
-rw-r--r--modules/simpletest/tests/entity_crud_hook_test.module23
-rw-r--r--modules/simpletest/tests/entity_crud_hook_test.test22
-rw-r--r--modules/simpletest/tests/form.test75
-rw-r--r--modules/simpletest/tests/form_test.module45
-rw-r--r--modules/simpletest/tests/https.php4
-rw-r--r--modules/simpletest/tests/image.test8
-rw-r--r--modules/simpletest/tests/mail.test4
-rw-r--r--modules/simpletest/tests/menu.test2
-rw-r--r--modules/simpletest/tests/module.test10
-rw-r--r--modules/simpletest/tests/requirements1_test.install2
-rw-r--r--modules/simpletest/tests/session.test8
-rw-r--r--modules/simpletest/tests/taxonomy_test.module30
-rw-r--r--modules/simpletest/tests/upgrade/drupal-6.forum.database.php14
-rw-r--r--modules/simpletest/tests/upgrade/drupal-6.menu.database.php27
-rw-r--r--modules/simpletest/tests/upgrade/drupal-7.aggregator.database.php149
-rw-r--r--modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gzbin97562 -> 97603 bytes
-rw-r--r--modules/simpletest/tests/upgrade/update.aggregator.test47
-rw-r--r--modules/simpletest/tests/upgrade/upgrade.forum.test6
24 files changed, 504 insertions, 77 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index d83dbeb6f..a67c77191 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -632,7 +632,7 @@ abstract class DrupalTestCase {
* 'one' => array(0, 1),
* 'two' => array(2, 3),
* );
- * $permutations = $this->permute($parameters);
+ * $permutations = DrupalTestCase::generatePermutations($parameters)
* // Result:
* $permutations == array(
* array('one' => 0, 'two' => 2),
@@ -1685,13 +1685,20 @@ class DrupalWebTestCase extends DrupalTestCase {
if (!isset($this->curlHandle)) {
$this->curlHandle = curl_init();
+
+ // Some versions/configurations of cURL break on a NULL cookie jar, so
+ // supply a real file.
+ if (empty($this->cookieFile)) {
+ $this->cookieFile = $this->public_files_directory . '/cookie.jar';
+ }
+
$curl_options = array(
CURLOPT_COOKIEJAR => $this->cookieFile,
CURLOPT_URL => $base_url,
CURLOPT_FOLLOWLOCATION => FALSE,
CURLOPT_RETURNTRANSFER => TRUE,
- CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on https.
- CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on https.
+ CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on HTTPS.
+ CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on HTTPS.
CURLOPT_HEADERFUNCTION => array(&$this, 'curlHeaderCallback'),
CURLOPT_USERAGENT => $this->databasePrefix,
);
@@ -1699,7 +1706,12 @@ class DrupalWebTestCase extends DrupalTestCase {
$curl_options[CURLOPT_HTTPAUTH] = $this->httpauth_method;
$curl_options[CURLOPT_USERPWD] = $this->httpauth_credentials;
}
- curl_setopt_array($this->curlHandle, $this->additionalCurlOptions + $curl_options);
+ // curl_setopt_array() returns FALSE if any of the specified options
+ // cannot be set, and stops processing any further options.
+ $result = curl_setopt_array($this->curlHandle, $this->additionalCurlOptions + $curl_options);
+ if (!$result) {
+ throw new Exception('One or more cURL options could not be set.');
+ }
// By default, the child session name should be the same as the parent.
$this->session_name = session_name();
@@ -2686,10 +2698,10 @@ class DrupalWebTestCase extends DrupalTestCase {
}
/**
- * Get the current url from the cURL handler.
+ * Get the current URL from the cURL handler.
*
* @return
- * The current url.
+ * The current URL.
*/
protected function getUrl() {
return $this->url;
diff --git a/modules/simpletest/simpletest.api.php b/modules/simpletest/simpletest.api.php
index 04c080bfd..d262ad613 100644
--- a/modules/simpletest/simpletest.api.php
+++ b/modules/simpletest/simpletest.api.php
@@ -20,7 +20,7 @@
*/
function hook_simpletest_alter(&$groups) {
// An alternative session handler module would not want to run the original
- // Session https handling test because it checks the sessions table in the
+ // Session HTTPS handling test because it checks the sessions table in the
// database.
unset($groups['Session']['testHttpsSession']);
}
diff --git a/modules/simpletest/simpletest.info b/modules/simpletest/simpletest.info
index b0bf9b228..5583c2f82 100644
--- a/modules/simpletest/simpletest.info
+++ b/modules/simpletest/simpletest.info
@@ -40,7 +40,6 @@ files[] = tests/update.test
files[] = tests/xmlrpc.test
files[] = tests/upgrade/upgrade.test
files[] = tests/upgrade/upgrade.comment.test
-files[] = tests/upgrade/update.field.test
files[] = tests/upgrade/upgrade.filter.test
files[] = tests/upgrade/upgrade.forum.test
files[] = tests/upgrade/upgrade.locale.test
@@ -49,7 +48,9 @@ files[] = tests/upgrade/upgrade.node.test
files[] = tests/upgrade/upgrade.taxonomy.test
files[] = tests/upgrade/upgrade.trigger.test
files[] = tests/upgrade/upgrade.translatable.test
-files[] = tests/upgrade/update.trigger.test
files[] = tests/upgrade/upgrade.upload.test
-files[] = tests/upgrade/update.user.test
files[] = tests/upgrade/upgrade.user.test
+files[] = tests/upgrade/update.aggregator.test
+files[] = tests/upgrade/update.trigger.test
+files[] = tests/upgrade/update.field.test
+files[] = tests/upgrade/update.user.test
diff --git a/modules/simpletest/tests/ajax_forms_test.module b/modules/simpletest/tests/ajax_forms_test.module
index 6a95710a8..28404224e 100644
--- a/modules/simpletest/tests/ajax_forms_test.module
+++ b/modules/simpletest/tests/ajax_forms_test.module
@@ -7,7 +7,6 @@
/**
* Implements hook_menu().
- * @return unknown_type
*/
function ajax_forms_test_menu() {
$items = array();
@@ -94,9 +93,6 @@ function ajax_forms_test_simple_form_checkbox_callback($form, $form_state) {
/**
* Form to display the Ajax Commands.
- * @param $form
- * @param $form_state
- * @return unknown_type
*/
function ajax_forms_test_ajax_commands_form($form, &$form_state) {
$form = array();
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 437b67cd1..e8e403330 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -1847,14 +1847,14 @@ class DrupalRenderTestCase extends DrupalWebTestCase {
class ValidUrlTestCase extends DrupalUnitTestCase {
public static function getInfo() {
return array(
- 'name' => 'Valid Url',
- 'description' => "Performs tests on Drupal's valid url function.",
+ 'name' => 'Valid URL',
+ 'description' => "Performs tests on Drupal's valid URL function.",
'group' => 'System'
);
}
/**
- * Test valid absolute urls.
+ * Test valid absolute URLs.
*/
function testValidAbsolute() {
$url_schemes = array('http', 'https', 'ftp');
@@ -1889,7 +1889,7 @@ class ValidUrlTestCase extends DrupalUnitTestCase {
}
/**
- * Test invalid absolute urls.
+ * Test invalid absolute URLs.
*/
function testInvalidAbsolute() {
$url_schemes = array('http', 'https', 'ftp');
@@ -1909,7 +1909,7 @@ class ValidUrlTestCase extends DrupalUnitTestCase {
}
/**
- * Test valid relative urls.
+ * Test valid relative URLs.
*/
function testValidRelative() {
$valid_relative_urls = array(
@@ -1930,7 +1930,7 @@ class ValidUrlTestCase extends DrupalUnitTestCase {
}
/**
- * Test invalid relative urls.
+ * Test invalid relative URLs.
*/
function testInvalidRelative() {
$invalid_relative_urls = array(
@@ -2540,12 +2540,12 @@ class DrupalAddFeedTestCase extends DrupalWebTestCase {
'output_url' => url($path, array('absolute' => TRUE)),
'title' => '',
),
- 'external url without title' => array(
+ 'external URL without title' => array(
'input_url' => $external_url,
'output_url' => $external_url,
'title' => '',
),
- 'local url without title' => array(
+ 'local URL without title' => array(
'input_url' => $fully_qualified_local_url,
'output_url' => $fully_qualified_local_url,
'title' => '',
@@ -2555,12 +2555,12 @@ class DrupalAddFeedTestCase extends DrupalWebTestCase {
'output_url' => url($path_for_title, array('absolute' => TRUE)),
'title' => $this->randomName(12),
),
- 'external url with title' => array(
+ 'external URL with title' => array(
'input_url' => $external_for_title,
'output_url' => $external_for_title,
'title' => $this->randomName(12),
),
- 'local url with title' => array(
+ 'local URL with title' => array(
'input_url' => $fully_qualified_for_title,
'output_url' => $fully_qualified_for_title,
'title' => $this->randomName(12),
@@ -2581,9 +2581,36 @@ class DrupalAddFeedTestCase extends DrupalWebTestCase {
* Create a pattern representing the RSS feed in the page.
*/
function urlToRSSLinkPattern($url, $title = '') {
- // Escape any regular expression characters in the url ('?' is the worst).
+ // Escape any regular expression characters in the URL ('?' is the worst).
$url = preg_replace('/([+?.*])/', '[$0]', $url);
$generated_pattern = '%<link +rel="alternate" +type="application/rss.xml" +title="' . $title . '" +href="' . $url . '" */>%';
return $generated_pattern;
}
}
+
+/**
+ * Test for theme_feed_icon().
+ */
+class FeedIconTest extends DrupalWebTestCase {
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'Feed icon',
+ 'description' => 'Check escaping of theme_feed_icon()',
+ 'group' => 'System',
+ );
+ }
+
+ /**
+ * Check that special characters are correctly escaped. Test for issue #1211668.
+ */
+ function testFeedIconEscaping() {
+ $variables = array();
+ $variables['url'] = 'node';
+ $variables['title'] = '<>&"\'';
+ $text = theme_feed_icon($variables);
+ preg_match('/title="(.*?)"/', $text, $matches);
+ $this->assertEqual($matches[1], 'Subscribe to &amp;&quot;&#039;', 'theme_feed_icon() escapes reserved HTML characters.');
+ }
+
+}
diff --git a/modules/simpletest/tests/database_test.test b/modules/simpletest/tests/database_test.test
index 660833606..6e1d15979 100644
--- a/modules/simpletest/tests/database_test.test
+++ b/modules/simpletest/tests/database_test.test
@@ -2803,14 +2803,17 @@ class DatabaseLoggingTestCase extends DatabaseTestCase {
* Test that we can log the existence of a query.
*/
function testEnableLogging() {
- Database::startLog('testing');
+ $log = Database::startLog('testing');
db_query('SELECT name FROM {test} WHERE age > :age', array(':age' => 25))->fetchCol();
db_query('SELECT age FROM {test} WHERE name = :name', array(':name' => 'Ringo'))->fetchCol();
+ // Trigger a call that does not have file in the backtrace.
+ call_user_func_array('db_query', array('SELECT age FROM {test} WHERE name = :name', array(':name' => 'Ringo')))->fetchCol();
+
$queries = Database::getLog('testing', 'default');
- $this->assertEqual(count($queries), 2, t('Correct number of queries recorded.'));
+ $this->assertEqual(count($queries), 3, t('Correct number of queries recorded.'));
foreach ($queries as $query) {
$this->assertEqual($query['caller']['function'], __FUNCTION__, t('Correct function in query log.'));
@@ -3746,9 +3749,9 @@ class DatabaseTransactionTestCase extends DatabaseTestCase {
class DatabaseNextIdCase extends DrupalWebTestCase {
public static function getInfo() {
return array(
- 'name' => t('Sequences API'),
- 'description' => t('Test the secondary sequences API.'),
- 'group' => t('Database'),
+ 'name' => 'Sequences API',
+ 'description' => 'Test the secondary sequences API.',
+ 'group' => 'Database',
);
}
@@ -3773,9 +3776,9 @@ class DatabaseNextIdCase extends DrupalWebTestCase {
class DatabaseEmptyStatementTestCase extends DrupalWebTestCase {
public static function getInfo() {
return array(
- 'name' => t('Empty statement'),
- 'description' => t('Test the empty pseudo-statement class.'),
- 'group' => t('Database'),
+ 'name' => 'Empty statement',
+ 'description' => 'Test the empty pseudo-statement class.',
+ 'group' => 'Database',
);
}
diff --git a/modules/simpletest/tests/entity_crud_hook_test.module b/modules/simpletest/tests/entity_crud_hook_test.module
index 873a162ce..d25dff1b3 100644
--- a/modules/simpletest/tests/entity_crud_hook_test.module
+++ b/modules/simpletest/tests/entity_crud_hook_test.module
@@ -1,8 +1,9 @@
<?php
-//
-// Presave hooks
-//
+/**
+ * @file
+ * Test module for the Entity CRUD API.
+ */
/**
* Implements hook_entity_presave().
@@ -53,10 +54,6 @@ function entity_crud_hook_test_user_presave() {
$_SESSION['entity_crud_hook_test'][] = (__FUNCTION__ . ' called');
}
-//
-// Insert hooks
-//
-
/**
* Implements hook_entity_insert().
*/
@@ -106,10 +103,6 @@ function entity_crud_hook_test_user_insert() {
$_SESSION['entity_crud_hook_test'][] = (__FUNCTION__ . ' called');
}
-//
-// Load hooks
-//
-
/**
* Implements hook_entity_load().
*/
@@ -159,10 +152,6 @@ function entity_crud_hook_test_user_load() {
$_SESSION['entity_crud_hook_test'][] = (__FUNCTION__ . ' called');
}
-//
-// Update hooks
-//
-
/**
* Implements hook_entity_update().
*/
@@ -212,10 +201,6 @@ function entity_crud_hook_test_user_update() {
$_SESSION['entity_crud_hook_test'][] = (__FUNCTION__ . ' called');
}
-//
-// Delete hooks
-//
-
/**
* Implements hook_entity_delete().
*/
diff --git a/modules/simpletest/tests/entity_crud_hook_test.test b/modules/simpletest/tests/entity_crud_hook_test.test
index 3f18fc855..178e34dc7 100644
--- a/modules/simpletest/tests/entity_crud_hook_test.test
+++ b/modules/simpletest/tests/entity_crud_hook_test.test
@@ -1,8 +1,14 @@
<?php
/**
- * Test invocation of hooks when inserting, loading, updating or deleting an
- * entity. Tested hooks are:
+ * @file
+ * CRUD hook tests for the Entity CRUD API.
+ */
+
+/**
+ * Tests invocation of hooks when performing an action.
+ *
+ * Tested hooks are:
* - hook_entity_insert()
* - hook_entity_load()
* - hook_entity_update()
@@ -48,7 +54,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
}
/**
- * Test hook invocations for CRUD operations on comments.
+ * Tests hook invocations for CRUD operations on comments.
*/
public function testCommentHooks() {
$node = (object) array(
@@ -108,7 +114,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
}
/**
- * Test hook invocations for CRUD operations on files.
+ * Tests hook invocations for CRUD operations on files.
*/
public function testFileHooks() {
$url = 'public://entity_crud_hook_test.file';
@@ -154,7 +160,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
}
/**
- * Test hook invocations for CRUD operations on nodes.
+ * Tests hook invocations for CRUD operations on nodes.
*/
public function testNodeHooks() {
$node = (object) array(
@@ -200,7 +206,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
}
/**
- * Test hook invocations for CRUD operations on taxonomy terms.
+ * Tests hook invocations for CRUD operations on taxonomy terms.
*/
public function testTaxonomyTermHooks() {
$vocabulary = (object) array(
@@ -248,7 +254,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
}
/**
- * Test hook invocations for CRUD operations on taxonomy vocabularies.
+ * Tests hook invocations for CRUD operations on taxonomy vocabularies.
*/
public function testTaxonomyVocabularyHooks() {
$vocabulary = (object) array(
@@ -288,7 +294,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
}
/**
- * Test hook invocations for CRUD operations on users.
+ * Tests hook invocations for CRUD operations on users.
*/
public function testUserHooks() {
$edit = array(
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index 985abe31b..675e8d189 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -1309,6 +1309,81 @@ class FormsRebuildTestCase extends DrupalWebTestCase {
}
/**
+ * Tests form redirection.
+ */
+class FormsRedirectTestCase extends DrupalWebTestCase {
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'Form redirecting',
+ 'description' => 'Tests functionality of drupal_redirect_form().',
+ 'group' => 'Form API',
+ );
+ }
+
+ function setUp() {
+ parent::setUp(array('form_test'));
+ }
+
+ /**
+ * Tests form redirection.
+ */
+ function testRedirect() {
+ $path = 'form-test/redirect';
+ $options = array('query' => array('foo' => 'bar'));
+ $options['absolute'] = TRUE;
+
+ // Test basic redirection.
+ $edit = array(
+ 'redirection' => TRUE,
+ 'destination' => $this->randomName(),
+ );
+ $this->drupalPost($path, $edit, t('Submit'));
+ $this->assertUrl($edit['destination'], array(), 'Basic redirection works.');
+
+
+ // Test without redirection.
+ $edit = array(
+ 'redirection' => FALSE,
+ );
+ $this->drupalPost($path, $edit, t('Submit'));
+ $this->assertUrl($path, array(), 'When redirect is set to FALSE, there should be no redirection.');
+
+ // Test redirection with query parameters.
+ $edit = array(
+ 'redirection' => TRUE,
+ 'destination' => $this->randomName(),
+ );
+ $this->drupalPost($path, $edit, t('Submit'), $options);
+ $this->assertUrl($edit['destination'], array(), 'Redirection with query parameters works.');
+
+ // Test without redirection but with query parameters.
+ $edit = array(
+ 'redirection' => FALSE,
+ );
+ $this->drupalPost($path, $edit, t('Submit'), $options);
+ $this->assertUrl($path, $options, 'When redirect is set to FALSE, there should be no redirection, and the query parameters should be passed along.');
+
+ // Test redirection back to the original path.
+ $edit = array(
+ 'redirection' => TRUE,
+ 'destination' => '',
+ );
+ $this->drupalPost($path, $edit, t('Submit'));
+ $this->assertUrl($path, array(), 'When using an empty redirection string, there should be no redirection.');
+
+ // Test redirection back to the original path with query parameters.
+ $edit = array(
+ 'redirection' => TRUE,
+ 'destination' => '',
+ );
+ $this->drupalPost($path, $edit, t('Submit'), $options);
+ $this->assertUrl($path, $options, 'When using an empty redirection string, there should be no redirection, and the query parameters should be passed along.');
+ }
+
+}
+
+/**
* Test the programmatic form submission behavior.
*/
class FormsProgrammaticTestCase extends DrupalWebTestCase {
diff --git a/modules/simpletest/tests/form_test.module b/modules/simpletest/tests/form_test.module
index e4ac77b12..5d6527680 100644
--- a/modules/simpletest/tests/form_test.module
+++ b/modules/simpletest/tests/form_test.module
@@ -151,6 +151,14 @@ function form_test_menu() {
'type' => MENU_CALLBACK,
);
+ $items['form-test/redirect'] = array(
+ 'title' => 'Redirect test',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('form_test_redirect'),
+ 'access callback' => TRUE,
+ 'type' => MENU_CALLBACK,
+ );
+
$items['form_test/form-labels'] = array(
'title' => 'Form label test',
'page callback' => 'drupal_get_form',
@@ -1644,6 +1652,43 @@ function form_test_clicked_button_submit($form, &$form_state) {
}
/**
+ * Form builder to detect form redirect.
+ */
+function form_test_redirect($form, &$form_state) {
+ $form['redirection'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Use redirection'),
+ );
+ $form['destination'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Redirect destination'),
+ '#states' => array(
+ 'visible' => array(
+ ':input[name="redirection"]' => array('checked' => TRUE),
+ ),
+ ),
+ );
+ $form['submit'] = array(
+ '#type' => 'submit',
+ '#value' => t('Submit'),
+ );
+
+ return $form;
+}
+
+/**
+ * Form submit handler to test different redirect behaviours.
+ */
+function form_test_redirect_submit(&$form, &$form_state) {
+ if (!empty($form_state['values']['redirection'])) {
+ $form_state['redirect'] = !empty($form_state['values']['destination']) ? $form_state['values']['destination'] : NULL;
+ }
+ else {
+ $form_state['redirect'] = FALSE;
+ }
+}
+
+/**
* Implements hook_form_FORM_ID_alter() for the registration form.
*/
function form_test_form_user_register_form_alter(&$form, &$form_state) {
diff --git a/modules/simpletest/tests/https.php b/modules/simpletest/tests/https.php
index b5ffab693..0e1a4edeb 100644
--- a/modules/simpletest/tests/https.php
+++ b/modules/simpletest/tests/https.php
@@ -2,13 +2,13 @@
/**
* @file
- * Fake an https request, for use during testing.
+ * Fake an HTTPS request, for use during testing.
*/
// Set a global variable to indicate a mock HTTPS request.
$is_https_mock = empty($_SERVER['HTTPS']);
-// Change to https.
+// Change to HTTPS.
$_SERVER['HTTPS'] = 'on';
foreach ($_SERVER as $key => $value) {
$_SERVER[$key] = str_replace('modules/simpletest/tests/https.php', 'index.php', $value);
diff --git a/modules/simpletest/tests/image.test b/modules/simpletest/tests/image.test
index 962aa661f..403c9d7d8 100644
--- a/modules/simpletest/tests/image.test
+++ b/modules/simpletest/tests/image.test
@@ -14,7 +14,13 @@ class ImageToolkitTestCase extends DrupalWebTestCase {
protected $image;
function setUp() {
- parent::setUp('image_test');
+ $modules = func_get_args();
+ if (isset($modules[0]) && is_array($modules[0])) {
+ $modules = $modules[0];
+ }
+ $modules[] = 'image_test';
+
+ parent::setUp($modules);
// Use the image_test.module's test toolkit.
$this->toolkit = 'test';
diff --git a/modules/simpletest/tests/mail.test b/modules/simpletest/tests/mail.test
index 09dcde60c..b7ce68544 100644
--- a/modules/simpletest/tests/mail.test
+++ b/modules/simpletest/tests/mail.test
@@ -150,7 +150,7 @@ class DrupalHtmlToTextTestCase extends DrupalWebTestCase {
$tests = array(
// @todo Trailing linefeeds should be trimmed.
'<a href = "http://drupal.org">Drupal.org</a>' => "Drupal.org [1]\n\n[1] http://drupal.org\n",
- // @todo Footer urls should be absolute.
+ // @todo Footer URLs should be absolute.
"<a href = \"$base_path\">Homepage</a>" => "Homepage [1]\n\n[1] $base_url/\n",
'<address>Drupal</address>' => "Drupal\n",
// @todo The <address> tag is currently not supported.
@@ -367,7 +367,7 @@ class DrupalHtmlToTextTestCase extends DrupalWebTestCase {
. '<br /><a href="http://www.example.com">Host, no path</a>'
. '<br /><a href="' . $base_path . 'node/1">Path, no host</a>'
. '<br /><a href="node/1">Relative path</a>';
- // @todo Footnote urls should be absolute.
+ // @todo Footnote URLs should be absolute.
$tt = "Host and path [1]"
. "\nHost, no path [2]"
// @todo The following two references should be combined.
diff --git a/modules/simpletest/tests/menu.test b/modules/simpletest/tests/menu.test
index b31fee6e3..1ecc1b1c1 100644
--- a/modules/simpletest/tests/menu.test
+++ b/modules/simpletest/tests/menu.test
@@ -599,7 +599,7 @@ class MenuRouterTestCase extends DrupalWebTestCase {
}
/**
- * Get a url and assert the title given a case number. If override is true,
+ * Get a URL and assert the title given a case number. If override is true,
* the title is asserted to begin with "Alternative".
*/
private function menuItemTitlesCasesHelper($case_no, $override = FALSE) {
diff --git a/modules/simpletest/tests/module.test b/modules/simpletest/tests/module.test
index f55c08af4..769c4cf89 100644
--- a/modules/simpletest/tests/module.test
+++ b/modules/simpletest/tests/module.test
@@ -25,7 +25,7 @@ class ModuleUnitTest extends DrupalWebTestCase {
$profile_info = install_profile_info('standard', 'en');
$module_list = $profile_info['dependencies'];
- // Install profile is a module that is expected to be loaded.
+ // Installation profile is a module that is expected to be loaded.
$module_list[] = 'standard';
sort($module_list);
@@ -171,12 +171,12 @@ class ModuleUnitTest extends DrupalWebTestCase {
$this->assertFalse(module_exists('php'), t('Disabling a module with unlisted dependents succeeded.'));
$this->assertEqual(variable_get('test_module_disable_order', array()), array('forum', 'poll', 'php'), t('Modules were disabled in the correct order by module_disable().'));
- // Disable a module that is listed as a dependency by the install profile.
- // Make sure that the profile itself is not on the list of dependent
- // modules to be disabled.
+ // Disable a module that is listed as a dependency by the installation
+ // profile. Make sure that the profile itself is not on the list of
+ // dependent modules to be disabled.
$profile = drupal_get_profile();
$info = install_profile_info($profile);
- $this->assertTrue(in_array('comment', $info['dependencies']), t('Comment module is listed as a dependency of the install profile.'));
+ $this->assertTrue(in_array('comment', $info['dependencies']), t('Comment module is listed as a dependency of the installation profile.'));
$this->assertTrue(module_exists('comment'), t('Comment module is enabled.'));
module_disable(array('comment'));
$this->assertFalse(module_exists('comment'), t('Comment module was disabled.'));
diff --git a/modules/simpletest/tests/requirements1_test.install b/modules/simpletest/tests/requirements1_test.install
index 651d911ab..91caca3f5 100644
--- a/modules/simpletest/tests/requirements1_test.install
+++ b/modules/simpletest/tests/requirements1_test.install
@@ -5,7 +5,7 @@
*/
function requirements1_test_requirements($phase) {
$requirements = array();
- // Ensure translations don't break at install time.
+ // Ensure translations don't break during installation.
$t = get_t();
// Always fails requirements.
diff --git a/modules/simpletest/tests/session.test b/modules/simpletest/tests/session.test
index e5ceb7538..a0feffbb0 100644
--- a/modules/simpletest/tests/session.test
+++ b/modules/simpletest/tests/session.test
@@ -289,14 +289,14 @@ class SessionTestCase extends DrupalWebTestCase {
}
/**
- * Ensure that when running under https two session cookies are generated.
+ * Ensure that when running under HTTPS two session cookies are generated.
*/
class SessionHttpsTestCase extends DrupalWebTestCase {
public static function getInfo() {
return array(
- 'name' => 'Session https handling',
- 'description' => 'Ensure that when running under https two session cookies are generated.',
+ 'name' => 'Session HTTPS handling',
+ 'description' => 'Ensure that when running under HTTPS two session cookies are generated.',
'group' => 'Session'
);
}
@@ -384,7 +384,7 @@ class SessionHttpsTestCase extends DrupalWebTestCase {
$this->cookies = array();
if ($is_https) {
- // The functionality does not make sense when running on https.
+ // The functionality does not make sense when running on HTTPS.
return;
}
diff --git a/modules/simpletest/tests/taxonomy_test.module b/modules/simpletest/tests/taxonomy_test.module
index aae13a2d4..f82950c30 100644
--- a/modules/simpletest/tests/taxonomy_test.module
+++ b/modules/simpletest/tests/taxonomy_test.module
@@ -3,6 +3,8 @@
/**
* @file
* Test module for Taxonomy hooks and functions not used in core.
+ *
+ * @see TaxonomyHooksTestCase::testTaxonomyTermHooks()
*/
/**
@@ -55,6 +57,34 @@ function taxonomy_test_taxonomy_term_delete($term) {
}
/**
+ * Implements hook_taxonomy_term_view().
+ */
+function taxonomy_test_taxonomy_term_view($term, $view_mode, $langcode) {
+ if ($view_mode == 'full') {
+ $term->content['taxonomy_test_term_view_check'] = array(
+ '#prefix' => '<div>',
+ '#markup' => t('The antonym is %antonym', array('%antonym' => $term->antonym)),
+ '#suffix' => '</div>',
+ '#weight' => 10,
+ );
+ }
+}
+
+/**
+ * Implements hook_entity_view().
+ */
+function taxonomy_test_entity_view($entity, $type, $view_mode, $langcode) {
+ if ($type == 'taxonomy_term' && $view_mode == 'full') {
+ $entity->content['taxonomy_test_entity_view_check'] = array(
+ '#prefix' => '<div>',
+ '#markup' => t('The antonym is %antonym', array('%antonym' => $entity->antonym)),
+ '#suffix' => '</div>',
+ '#weight' => 20,
+ );
+ }
+}
+
+/**
* Implements hook_form_alter().
*/
function taxonomy_test_form_alter(&$form, $form_state, $form_id) {
diff --git a/modules/simpletest/tests/upgrade/drupal-6.forum.database.php b/modules/simpletest/tests/upgrade/drupal-6.forum.database.php
index 5a2cc3324..059af6d22 100644
--- a/modules/simpletest/tests/upgrade/drupal-6.forum.database.php
+++ b/modules/simpletest/tests/upgrade/drupal-6.forum.database.php
@@ -258,3 +258,17 @@ db_insert('vocabulary_node_types')->fields(array(
))
->execute();
+// Provide all users with the ability to create forum topics.
+$results = db_select('permission', 'p')
+ ->fields('p')
+ ->execute();
+
+foreach ($results as $result) {
+ $permissions = $result->perm . ', create forum topics';
+ db_update('permission')
+ ->fields(array(
+ 'perm' => $permissions,
+ ))
+ ->condition('rid', $result->rid)
+ ->execute();
+}
diff --git a/modules/simpletest/tests/upgrade/drupal-6.menu.database.php b/modules/simpletest/tests/upgrade/drupal-6.menu.database.php
index 8962615fb..7fae337aa 100644
--- a/modules/simpletest/tests/upgrade/drupal-6.menu.database.php
+++ b/modules/simpletest/tests/upgrade/drupal-6.menu.database.php
@@ -126,6 +126,33 @@ db_insert('menu_links')->fields(array(
'p9' => '0',
'updated' => '0',
))
+->values(array(
+ 'menu_name' => 'secondary-links',
+ 'mlid' => '206',
+ 'plid' => '0',
+ 'link_path' => 'node',
+ 'router_path' => 'node',
+ 'link_title' => 'node-page-with-query',
+ 'options' => 'a:2:{s:5:"query";s:14:"page=1&node=10";s:10:"attributes";a:1:{s:5:"title";s:0:"";}}',
+ 'module' => 'menu',
+ 'hidden' => '0',
+ 'external' => '0',
+ 'has_children' => '0',
+ 'expanded' => '0',
+ 'weight' => '2',
+ 'depth' => '1',
+ 'customized' => '1',
+ 'p1' => '206',
+ 'p2' => '0',
+ 'p3' => '0',
+ 'p4' => '0',
+ 'p5' => '0',
+ 'p6' => '0',
+ 'p7' => '0',
+ 'p8' => '0',
+ 'p9' => '0',
+ 'updated' => '0',
+))
->execute();
db_insert('blocks')->fields(array(
'bid',
diff --git a/modules/simpletest/tests/upgrade/drupal-7.aggregator.database.php b/modules/simpletest/tests/upgrade/drupal-7.aggregator.database.php
new file mode 100644
index 000000000..00ea7d228
--- /dev/null
+++ b/modules/simpletest/tests/upgrade/drupal-7.aggregator.database.php
@@ -0,0 +1,149 @@
+<?php
+/**
+ * @file
+ * Test content for the aggregator update path.
+ */
+
+db_insert('aggregator_feed')->fields(array(
+ 'fid',
+ 'title',
+ 'url',
+ 'refresh',
+ 'checked',
+ 'queued',
+ 'link',
+ 'description',
+ 'image',
+ 'hash',
+ 'etag',
+ 'modified',
+ 'block',
+))
+ ->values(array(
+ 'fid' => '1',
+ 'title' => 'Drupal commit log',
+ 'url' => 'http://drupal.org/commitlog/feed',
+ 'refresh' => '3600',
+ 'checked' => '1347209523',
+ 'queued' => '0',
+ 'link' => 'http://drupal.org/versioncontrol/garbage/path',
+ 'description' => '',
+ 'image' => '',
+ 'hash' => '84f57ae5bffa7fd56942a6293be91244d8551cd18204a7c7de6a17065ea4d54d',
+ 'etag' => '"1347206975"',
+ 'modified' => '1347206975',
+ 'block' => '5',
+))
+ ->execute();
+
+db_insert('aggregator_item')->fields(array(
+ 'iid',
+ 'fid',
+ 'title',
+ 'link',
+ 'author',
+ 'description',
+ 'timestamp',
+ 'guid',
+))
+ ->values(array(
+ 'iid' => '1',
+ 'fid' => '1',
+ 'title' => 'Domain Access: Commit b904022 on 7.x-2.x authored by bforchhammer, committed by agentrickard',
+ 'link' => 'http://drupal.org/commitlog/commit/2%2C410/b90402243b4a9dee0d2e2c4a729dcb2f58dc53c0',
+ 'author' => 'bforchhammer',
+ 'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-10\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/b90402243b4a9dee0d2e2c4a729dcb2f58dc53c0:/domain_source/domain_source.info\">/domain_source/domain_source.info</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">1 addition & 1 deletion</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span></span></span>\n </div>\n </div>\n <div class=\"views-row views-row-2 views-row-even views-row-last\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/b90402243b4a9dee0d2e2c4a729dcb2f58dc53c0:/domain_source/domain_source.views.inc\">/domain_source/domain_source.views.inc</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">13 additions & 1 deletion</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span></span></span>\n </div>\n </div>\n </div>\n \n \n \n \n \n \n</div>\n<pre>Patch #1685658 by bforchhammer. Better handling of current domain for Domain Source.\n</pre>",
+ 'timestamp' => '1347206044',
+ 'guid' => 'VCS Operation 3936918 at http://drupal.org',
+))
+ ->values(array(
+ 'iid' => '2',
+ 'fid' => '1',
+ 'title' => 'Video: Commit b0b7ff0 on 7.x-2.x by Jorrit',
+ 'link' => 'http://drupal.org/commitlog/commit/846/b0b7ff08fed89c76454aa54627cc219361365d7b',
+ 'author' => 'Jorrit',
+ 'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-9\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/video.git/blob/b0b7ff08fed89c76454aa54627cc219361365d7b:/libraries/phpvideotoolkit/phpvideotoolkit.php5.php\">/libraries/phpvideotoolkit/phpvideotoolkit.php5.php</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">5 additions & 5 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"no-op\"> </span></span></span>\n </div>\n </div>\n <div class=\"views-row views-row-2 views-row-even\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/video.git/blob/b0b7ff08fed89c76454aa54627cc219361365d7b:/tests/TranscoderAbstractionFactoryFfmpeg.test\">/tests/TranscoderAbstractionFactoryFfmpeg.test</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">21 additions & 7 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"minus\">-</span></span></span>\n </div>\n </div>\n <div class=\"views-row views-row-3 views-row-odd views-row-last\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/video.git/blob/b0b7ff08fed89c76454aa54627cc219361365d7b:/transcoders/TranscoderAbstractionFactoryFfmpeg.inc\">/transcoders/TranscoderAbstractionFactoryFfmpeg.inc</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">31 additions & 22 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"minus\">-</span></span></span>\n </div>\n </div>\n </div>\n \n \n \n \n \n \n</div>\n<pre>Issue #1492296 by Jorrit: Added support for avconv binaries instead of FFmpeg.\n</pre>",
+ 'timestamp' => '1347206397',
+ 'guid' => 'VCS Operation 3936924 at http://drupal.org',
+))
+ ->values(array(
+ 'iid' => '3',
+ 'fid' => '1',
+ 'title' => 'Remove Login Tabs: Commit 6e1eb5a on 7.x-1.x by highrockmedia',
+ 'link' => 'http://drupal.org/commitlog/commit/41%2C610/6e1eb5a4a952db3264e7696e840ac3d797f4b477',
+ 'author' => 'highrockmedia',
+ 'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-8\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/sandbox/highrockmedia/1702096.git/blob/6e1eb5a4a952db3264e7696e840ac3d797f4b477:/readme.txt\">/readme.txt</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">10 additions & 2 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span></span></span>\n </div>\n </div>\n </div>\n \n \n \n \n \n \n</div>\n<pre>Updating readme\n</pre>",
+ 'timestamp' => '1347206401',
+ 'guid' => 'VCS Operation 3936920 at http://drupal.org',
+))
+ ->values(array(
+ 'iid' => '4',
+ 'fid' => '1',
+ 'title' => 'TimeGroup: Commit 6ed4c08 on 7.x-1.x by Sweetchuck',
+ 'link' => 'http://drupal.org/commitlog/commit/40%2C448/6ed4c085e5d9a8d33e091e1b8a65c73eab2dc99e',
+ 'author' => 'Sweetchuck',
+ 'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-7\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/sandbox/Sweetchuck/1666642.git/blob/6ed4c085e5d9a8d33e091e1b8a65c73eab2dc99e:/includes/ctools/export_ui/timegroup.inc\">/includes/ctools/export_ui/timegroup.inc</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">1 addition & 1 deletion</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span></span></span>\n </div>\n </div>\n </div>\n \n \n \n \n \n \n</div>\n<pre>CTools UI - Wrong default value for timeoffset fix.\n</pre>",
+ 'timestamp' => '1347206533',
+ 'guid' => 'VCS Operation 3936942 at http://drupal.org',
+))
+ ->values(array(
+ 'iid' => '5',
+ 'fid' => '1',
+ 'title' => 'Domain Access: Commit 1140172 on 6.x-2.x authored by bforchhammer, committed by agentrickard',
+ 'link' => 'http://drupal.org/commitlog/commit/2%2C410/11401723f5c5d11032dd141ba4939ed889a7a915',
+ 'author' => 'bforchhammer',
+ 'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-6\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/11401723f5c5d11032dd141ba4939ed889a7a915:/domain_source/domain_source.views.inc\">/domain_source/domain_source.views.inc</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">33 additions & 1 deletion</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"no-op\"> </span></span></span>\n </div>\n </div>\n <div class=\"views-row views-row-2 views-row-even views-row-last\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/11401723f5c5d11032dd141ba4939ed889a7a915:/domain_source/includes/domain_source_handler_filter_domain_id.inc\">/domain_source/includes/domain_source_handler_filter_domain_id.inc</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">28 additions & 0 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span></span></span>\n </div>\n </div>\n </div>\n \n \n \n \n \n \n</div>\n<pre>Patch #1685658 by bforchhammer. Better handling of current domain for Domain Source.\n</pre>",
+ 'timestamp' => '1347206541',
+ 'guid' => 'VCS Operation 3936926 at http://drupal.org',
+))
+ ->values(array(
+ 'iid' => '6',
+ 'fid' => '1',
+ 'title' => 'Domain Access: Commit 19b1c36 on 7.x-2.x by agentrickard',
+ 'link' => 'http://drupal.org/commitlog/commit/2%2C410/19b1c366d86cecd8a9f6e1a6e835c0566f5c02db',
+ 'author' => 'agentrickard',
+ 'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-5\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/19b1c366d86cecd8a9f6e1a6e835c0566f5c02db:/domain_source/includes/domain_source_handler_filter_domain_id.inc\">/domain_source/includes/domain_source_handler_filter_domain_id.inc</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">28 additions & 0 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span></span></span>\n </div>\n </div>\n </div>\n \n \n \n \n \n \n</div>\n<pre>Adds new Views file to Domain Source.\n</pre>",
+ 'timestamp' => '1347206601',
+ 'guid' => 'VCS Operation 3936928 at http://drupal.org',
+))
+ ->values(array(
+ 'iid' => '7',
+ 'fid' => '1',
+ 'title' => 'Domain Access: Commit d2d5456 on 7.x-3.x by agentrickard',
+ 'link' => 'http://drupal.org/commitlog/commit/2%2C410/d2d5456cad6ca57bb72e743da6a7112a74d7a331',
+ 'author' => 'agentrickard',
+ 'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-4\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/d2d5456cad6ca57bb72e743da6a7112a74d7a331:/domain_source/includes/domain_source_handler_filter_domain_id.inc\">/domain_source/includes/domain_source_handler_filter_domain_id.inc</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">29 additions & 0 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span></span></span>\n </div>\n </div>\n </div>\n \n \n \n \n \n \n</div>\n<pre>Adds new Views file to Domain Source.\n</pre>",
+ 'timestamp' => '1347206620',
+ 'guid' => 'VCS Operation 3936930 at http://drupal.org',
+))
+ ->values(array(
+ 'iid' => '8',
+ 'fid' => '1',
+ 'title' => 'Skarabee: Commit 400b519 on 7.x-1.x by sboersma',
+ 'link' => 'http://drupal.org/commitlog/commit/23%2C278/400b5190f59b1cb58d6b27fa10ac668e9580aa73',
+ 'author' => 'sboersma',
+ 'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-3\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/sandbox/sboersma/1176520.git/blob/400b5190f59b1cb58d6b27fa10ac668e9580aa73:/skarabee.install\">/skarabee.install</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">3 additions & 3 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"no-op\"> </span></span></span>\n </div>\n </div>\n </div>\n \n \n \n \n \n \n</div>\n<pre>sboersma: Changed variable deletion method.\n</pre>",
+ 'timestamp' => '1347206709',
+ 'guid' => 'VCS Operation 3936932 at http://drupal.org',
+))
+ ->values(array(
+ 'iid' => '9',
+ 'fid' => '1',
+ 'title' => 'Config entity listing plugin API: Commit dd3fa73 on 8.x-list by damiankloip',
+ 'link' => 'http://drupal.org/commitlog/commit/43%2C586/dd3fa73b0bcdca833bbde1d1ddb3cefe42003693',
+ 'author' => 'damiankloip',
+ 'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-2\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/sandbox/damiankloip/1778654.git/blob/dd3fa73b0bcdca833bbde1d1ddb3cefe42003693:/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListingTest.php\">/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListingTest.php</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">10 additions & 2 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span></span></span>\n </div>\n </div>\n </div>\n \n \n \n \n \n \n</div>\n<pre>Added tests for getList() method\n</pre>",
+ 'timestamp' => '1347206738',
+ 'guid' => 'VCS Operation 3936936 at http://drupal.org',
+))
+ ->values(array(
+ 'iid' => '10',
+ 'fid' => '1',
+ 'title' => 'AutoSlave: Commit 76891da on 7.x-1.x by gielfeldt',
+ 'link' => 'http://drupal.org/commitlog/commit/42%2C968/76891daf3cea9c294daf56a26760cb1bf33ea58a',
+ 'author' => 'gielfeldt',
+ 'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-1\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/autoslave.git/blob/76891daf3cea9c294daf56a26760cb1bf33ea58a:/autoslave.module\">/autoslave.module</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">10 additions & 7 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"minus\">-</span></span></span>\n </div>\n </div>\n <div class=\"views-row views-row-2 views-row-even views-row-last\">\n \n <div class=\"views-field-path\">\n <span class=\"field-content\"><a href=\"http://drupalcode.org/project/autoslave.git/blob/76891daf3cea9c294daf56a26760cb1bf33ea58a:/autoslave/database.inc\">/autoslave/database.inc</a></span>\n </div>\n \n <div class=\"views-field-changed-lines\">\n <span class=\"field-content\">10 additions & 2 deletions</span>\n </div>\n \n <div class=\"views-field-visual-diffstat\">\n <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span></span></span>\n </div>\n </div>\n </div>\n \n \n \n \n \n \n</div>\n<pre>Keep track of affected tables per commit.\n</pre>",
+ 'timestamp' => '1347206751',
+ 'guid' => 'VCS Operation 3936934 at http://drupal.org',
+))
+ ->execute();
diff --git a/modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz b/modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz
index 5cc5690e1..472eedb23 100644
--- a/modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz
+++ b/modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz
Binary files differ
diff --git a/modules/simpletest/tests/upgrade/update.aggregator.test b/modules/simpletest/tests/upgrade/update.aggregator.test
new file mode 100644
index 000000000..d4135774e
--- /dev/null
+++ b/modules/simpletest/tests/upgrade/update.aggregator.test
@@ -0,0 +1,47 @@
+<?php
+/**
+ * @file
+ * Tests schema changes in aggregator.module.
+ */
+class AggregatorUpdatePathTestCase extends UpdatePathTestCase {
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'Aggregator update path',
+ 'description' => 'Aggregator update path tests.',
+ 'group' => 'Upgrade path',
+ );
+ }
+
+ public function setUp() {
+ // Use the normal installation and add our feed data.
+ $path = drupal_get_path('module', 'simpletest') . '/tests/upgrade';
+ $this->databaseDumpFiles = array(
+ $path . '/drupal-7.bare.standard_all.database.php.gz',
+ $path . '/drupal-7.aggregator.database.php',
+ );
+ parent::setUp();
+
+ // Our test data only relies on aggregator.module.
+ $this->uninstallModulesExcept(array('aggregator'));
+ }
+
+ /**
+ * Tests that the aggregator.module update is successful.
+ */
+ public function testAggregatorUpdate() {
+ // Get a selection of the fields affected by the schema update.
+ $query = db_select('aggregator_feed', 'af');
+ $query->join('aggregator_item', 'ai', 'af.fid = ai.fid');
+ $query
+ ->fields('af', array('url', 'link'))
+ ->fields('ai', array('link', 'guid'));
+
+ $pre_update_data = $query->execute()->fetchAll();
+ $this->assertTrue($this->performUpgrade(), 'The update was completed successfully.');
+ $post_update_data = $query->execute()->fetchAll();
+
+ $this->assertTrue($pre_update_data == $post_update_data, 'Feed data was preserved during the update.');
+ }
+
+}
diff --git a/modules/simpletest/tests/upgrade/upgrade.forum.test b/modules/simpletest/tests/upgrade/upgrade.forum.test
index 99269d9f4..ebac85415 100644
--- a/modules/simpletest/tests/upgrade/upgrade.forum.test
+++ b/modules/simpletest/tests/upgrade/upgrade.forum.test
@@ -56,5 +56,9 @@ class ForumUpgradePathTestCase extends UpgradePathTestCase {
$this->drupalGet("forum/$tid");
$this->assertText('Bananas');
- }
+ $this->drupalLogout();
+
+ $this->drupalGet("node/add/forum/$tid");
+ $this->assertResponse(200, t('User can access forum creation page.'));
+ }
}