update to drupal 7.23
This commit is contained in:
@@ -34,7 +34,7 @@ class FieldUpdatePathTestCase extends UpdatePathTestCase {
|
||||
* Tests that the update is successful.
|
||||
*/
|
||||
public function testFilledUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The update was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The update was completed successfully.');
|
||||
$expected_settings = array(
|
||||
'extra_fields' => array(
|
||||
'display' => array(
|
||||
|
@@ -32,6 +32,6 @@ class TriggerUpdatePathTestCase extends UpdatePathTestCase {
|
||||
* Tests that the upgrade is successful.
|
||||
*/
|
||||
public function testFilledUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
}
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ class UserUpdatePathTestCase extends UpdatePathTestCase {
|
||||
* Tests that the update is successful.
|
||||
*/
|
||||
public function testFilledUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The update was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The update was completed successfully.');
|
||||
$this->assertTrue(db_index_exists('users', 'picture'), 'The {users}.picture column has an index.');
|
||||
}
|
||||
}
|
||||
|
@@ -27,6 +27,6 @@ class CommentUpgradePathTestCase extends UpgradePathTestCase {
|
||||
* Test a successful upgrade.
|
||||
*/
|
||||
public function testCommentUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
}
|
||||
}
|
||||
|
@@ -28,20 +28,20 @@ class FilterFormatUpgradePathTestCase extends UpgradePathTestCase {
|
||||
* Test a successful upgrade.
|
||||
*/
|
||||
function testFilterFormatUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
$format = filter_format_load('1');
|
||||
$this->assertTrue($format->format == '1', t('Filter format found.'));
|
||||
$this->assertTrue($format->format == '1', 'Filter format found.');
|
||||
$format->format = 'test_filter';
|
||||
$format->name = 'Test filter';
|
||||
filter_format_save($format);
|
||||
$format = filter_format_load('test_filter');
|
||||
$this->assertTrue($format->format == 'test_filter', t('Saved a filter format with machine name.'));
|
||||
$this->assertTrue($format->format == 'test_filter', 'Saved a filter format with machine name.');
|
||||
|
||||
$account = user_load(4);
|
||||
user_save($account, array('signature_format' => 'test_filter'));
|
||||
$account = user_load(4);
|
||||
$this->assertTrue($account->signature_format == 'test_filter', t('Signature format changed successfully to a filter format with machine name.'));
|
||||
$this->assertTrue($account->signature_format == 'test_filter', 'Signature format changed successfully to a filter format with machine name.');
|
||||
|
||||
$delta = db_insert('block_custom')
|
||||
->fields(array(
|
||||
@@ -50,6 +50,6 @@ class FilterFormatUpgradePathTestCase extends UpgradePathTestCase {
|
||||
'format' => 'test_filter',
|
||||
))
|
||||
->execute();
|
||||
$this->assertTrue($delta > 0, t('Created a custom block using a filter format with machine name.'));
|
||||
$this->assertTrue($delta > 0, 'Created a custom block using a filter format with machine name.');
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ class ForumUpgradePathTestCase extends UpgradePathTestCase {
|
||||
* Test a successful upgrade (no negotiation).
|
||||
*/
|
||||
public function testForumUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Work around http://drupal.org/node/931512
|
||||
$this->drupalPost('admin/structure/types/manage/forum/fields', array(), t('Save'));
|
||||
@@ -47,11 +47,11 @@ class ForumUpgradePathTestCase extends UpgradePathTestCase {
|
||||
);
|
||||
$this->drupalPost("node/add/forum/$tid", $edit, t('Save'));
|
||||
$type = t('Forum topic');
|
||||
$this->assertRaw(t('@type %title has been created.', array('@type' => $type, '%title' => $title)), t('Forum topic was created'));
|
||||
$this->assertRaw(t('@type %title has been created.', array('@type' => $type, '%title' => $title)), 'Forum topic was created');
|
||||
|
||||
// Retrieve node object, ensure that the topic was created and in the proper forum.
|
||||
$node = $this->drupalGetNodeByTitle($title);
|
||||
$this->assertTrue($node != NULL, t('Node @title was loaded', array('@title' => $title)));
|
||||
$this->assertTrue($node != NULL, format_string('Node @title was loaded', array('@title' => $title)));
|
||||
$this->assertEqual($node->taxonomy_forums[LANGUAGE_NONE][0]['tid'], $tid, 'Saved forum topic was in the expected forum');
|
||||
|
||||
$this->drupalGet("forum/$tid");
|
||||
@@ -59,6 +59,6 @@ class ForumUpgradePathTestCase extends UpgradePathTestCase {
|
||||
$this->drupalLogout();
|
||||
|
||||
$this->drupalGet("node/add/forum/$tid");
|
||||
$this->assertResponse(200, t('User can access forum creation page.'));
|
||||
$this->assertResponse(200, 'User can access forum creation page.');
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ class LocaleUpgradePathTestCase extends UpgradePathTestCase {
|
||||
* Test a successful upgrade (no negotiation).
|
||||
*/
|
||||
public function testLocaleUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// The home page should be in French.
|
||||
$this->assertPageInLanguage('', 'fr');
|
||||
@@ -46,13 +46,13 @@ class LocaleUpgradePathTestCase extends UpgradePathTestCase {
|
||||
// LANGUAGE_NEGOTIATION_PATH_DEFAULT.
|
||||
$this->variable_set('language_negotiation', 1);
|
||||
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// The home page should be in French.
|
||||
$this->assertPageInLanguage('', 'fr');
|
||||
|
||||
// The language switcher block should be displayed.
|
||||
$this->assertRaw('block-locale-language', t('The language switcher block is displayed.'));
|
||||
$this->assertRaw('block-locale-language', 'The language switcher block is displayed.');
|
||||
|
||||
// The French prefix should not be active because French is the default language.
|
||||
$this->drupalGet('fr');
|
||||
@@ -75,7 +75,7 @@ class LocaleUpgradePathTestCase extends UpgradePathTestCase {
|
||||
->condition('uid', 1)
|
||||
->execute();
|
||||
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Both prefixes should be active.
|
||||
$this->assertPageInLanguage('fr', 'fr');
|
||||
@@ -85,7 +85,7 @@ class LocaleUpgradePathTestCase extends UpgradePathTestCase {
|
||||
$this->assertPageInLanguage('', 'en');
|
||||
|
||||
// The language switcher block should be displayed.
|
||||
$this->assertRaw('block-locale-language', t('The language switcher block is displayed.'));
|
||||
$this->assertRaw('block-locale-language', 'The language switcher block is displayed.');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,13 +95,13 @@ class LocaleUpgradePathTestCase extends UpgradePathTestCase {
|
||||
// LANGUAGE_NEGOTIATION_DOMAIN.
|
||||
$this->variable_set('language_negotiation', 3);
|
||||
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// The home page should be in French.
|
||||
$this->assertPageInLanguage('', 'fr');
|
||||
|
||||
// The language switcher block should be displayed.
|
||||
$this->assertRaw('block-locale-language', t('The language switcher block is displayed.'));
|
||||
$this->assertRaw('block-locale-language', 'The language switcher block is displayed.');
|
||||
|
||||
// The language switcher block should point to http://en.example.com.
|
||||
$language_links = $this->xpath('//ul[contains(@class, :class)]/li/a', array(':class' => 'language-switcher-locale-url'));
|
||||
@@ -111,7 +111,7 @@ class LocaleUpgradePathTestCase extends UpgradePathTestCase {
|
||||
$found_english_link = TRUE;
|
||||
}
|
||||
}
|
||||
$this->assertTrue($found_english_link, t('The English link points to the correct domain.'));
|
||||
$this->assertTrue($found_english_link, 'The English link points to the correct domain.');
|
||||
|
||||
// Both prefixes should be inactive.
|
||||
$this->drupalGet('en');
|
||||
|
@@ -27,7 +27,7 @@ class MenuUpgradePathTestCase extends UpgradePathTestCase {
|
||||
* Test a successful upgrade.
|
||||
*/
|
||||
public function testMenuUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Test the migration of "Default menu for content" setting to individual
|
||||
// node types.
|
||||
|
@@ -26,7 +26,7 @@ class NodeBodyUpgradePathTestCase extends UpgradePathTestCase {
|
||||
* Test a successful upgrade.
|
||||
*/
|
||||
public function testNodeBodyUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
$instance = field_info_instance('node', 'body', 'story');
|
||||
$this->assertIdentical($instance['required'], 0, 'The required setting was preserved during the upgrade path.');
|
||||
@@ -77,7 +77,7 @@ class DisabledNodeTypeTestCase extends UpgradePathTestCase {
|
||||
* Tests a successful upgrade.
|
||||
*/
|
||||
public function testDisabledNodeTypeUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
$this->assertTrue(field_info_instance('comment', 'comment_body', 'comment_node_broken'), 'Comment body field instance was created for comments attached to the disabled broken node type');
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ class PollUpgradePathTestCase extends UpgradePathTestCase {
|
||||
* Test a successful upgrade.
|
||||
*/
|
||||
public function testPollUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Check modules page for poll
|
||||
$this->drupalGet('admin/modules');
|
||||
@@ -126,14 +126,14 @@ class PollUpgradePathTestCase extends UpgradePathTestCase {
|
||||
$nbchoices = ($i % 4) + 2;
|
||||
|
||||
for ($c = 0; $c < $nbchoices; $c++) {
|
||||
$this->assertText("Choice $c for poll $i", t('Choice text is displayed correctly on poll view'));
|
||||
$this->assertText("Choice $c for poll $i", 'Choice text is displayed correctly on poll view');
|
||||
}
|
||||
|
||||
// Now check that the votes are correct
|
||||
$this->clickLink(t('Results'));
|
||||
|
||||
for ($c = 0; $c < $nbchoices; $c++) {
|
||||
$this->assertText("Choice $c for poll $i", t('Choice text is displayed correctly on result view'));
|
||||
$this->assertText("Choice $c for poll $i", 'Choice text is displayed correctly on result view');
|
||||
}
|
||||
|
||||
$nbvotes = floor (($i % 4) + 5);
|
||||
@@ -141,7 +141,7 @@ class PollUpgradePathTestCase extends UpgradePathTestCase {
|
||||
for ($c = 0; $c < $nbchoices; $c++) {
|
||||
$votes = floor($nbvotes / $nbchoices);
|
||||
if (($nbvotes % $nbchoices) > $c) $votes++;
|
||||
$this->assertTrue(preg_match("/$votes vote/", $elements[$c]), t('The number of votes is displayed correctly: expected ' . $votes . ', got ' . $elements[$c]));
|
||||
$this->assertTrue(preg_match("/$votes vote/", $elements[$c]), 'The number of votes is displayed correctly: expected ' . $votes . ', got ' . $elements[$c]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ class PollUpgradePathTestCase extends UpgradePathTestCase {
|
||||
* Test a successful upgrade.
|
||||
*/
|
||||
public function testPollUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Check modules page for poll
|
||||
$this->drupalGet('admin/modules');
|
||||
@@ -44,14 +44,14 @@ class PollUpgradePathTestCase extends UpgradePathTestCase {
|
||||
$nbchoices = ($i % 4) + 2;
|
||||
|
||||
for ($c = 0; $c < $nbchoices; $c++) {
|
||||
$this->assertText("Choice $c for poll $i", t('Choice text is displayed correctly on poll view'));
|
||||
$this->assertText("Choice $c for poll $i", 'Choice text is displayed correctly on poll view');
|
||||
}
|
||||
|
||||
// Now check that the votes are correct
|
||||
$this->clickLink(t('Results'));
|
||||
|
||||
for ($c = 0; $c < $nbchoices; $c++) {
|
||||
$this->assertText("Choice $c for poll $i", t('Choice text is displayed correctly on result view'));
|
||||
$this->assertText("Choice $c for poll $i", 'Choice text is displayed correctly on result view');
|
||||
}
|
||||
|
||||
$nbvotes = floor (($i % 4) + 5);
|
||||
@@ -59,7 +59,7 @@ class PollUpgradePathTestCase extends UpgradePathTestCase {
|
||||
for ($c = 0; $c < $nbchoices; $c++) {
|
||||
$votes = floor($nbvotes / $nbchoices);
|
||||
if (($nbvotes % $nbchoices) > $c) $votes++;
|
||||
$this->assertTrue(preg_match("/$votes vote/", $elements[$c]), t('The number of votes is displayed correctly: expected ' . $votes . ', got ' . $elements[$c]));
|
||||
$this->assertTrue(preg_match("/$votes vote/", $elements[$c]), 'The number of votes is displayed correctly: expected ' . $votes . ', got ' . $elements[$c]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -46,15 +46,15 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
|
||||
* Basic tests for the taxonomy upgrade.
|
||||
*/
|
||||
public function testTaxonomyUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Visit the front page to assert for PHP warning and errors.
|
||||
$this->drupalGet('');
|
||||
|
||||
// Check that taxonomy_vocabulary_node_type and taxonomy_term_node have been
|
||||
// removed.
|
||||
$this->assertFalse(db_table_exists('taxonomy_vocabulary_node_type'), t('taxonomy_vocabulary_node_type has been removed.'));
|
||||
$this->assertFalse(db_table_exists('taxonomy_term_node'), t('taxonomy_term_node has been removed.'));
|
||||
$this->assertFalse(db_table_exists('taxonomy_vocabulary_node_type'), 'taxonomy_vocabulary_node_type has been removed.');
|
||||
$this->assertFalse(db_table_exists('taxonomy_term_node'), 'taxonomy_term_node has been removed.');
|
||||
|
||||
// Check that the node type 'page' has been associated to a taxonomy
|
||||
// reference field for each vocabulary.
|
||||
@@ -66,7 +66,7 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
|
||||
$inst_keys = array_keys($instances);
|
||||
sort($voc_keys);
|
||||
sort($inst_keys);
|
||||
$this->assertEqual($voc_keys, $inst_keys, t('Node type page has instances for every vocabulary.'));
|
||||
$this->assertEqual($voc_keys, $inst_keys, 'Node type page has instances for every vocabulary.');
|
||||
|
||||
// Ensure instance variables are getting through.
|
||||
foreach ($instances as $instance) {
|
||||
@@ -80,13 +80,13 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
|
||||
// the taxonomyextra field.
|
||||
$instances = $this->instanceVocabularies('node', 'story');
|
||||
$field_names = array_flip($instances);
|
||||
$this->assertEqual(count($field_names), 1, t('Only one taxonomy term field instance exists for story nodes'));
|
||||
$this->assertEqual(key($field_names), 'taxonomyextra', t('Only the excess taxonomy term field is used on story nodes'));
|
||||
$this->assertEqual(count($field_names), 1, 'Only one taxonomy term field instance exists for story nodes');
|
||||
$this->assertEqual(key($field_names), 'taxonomyextra', 'Only the excess taxonomy term field is used on story nodes');
|
||||
|
||||
// Check that the node type 'poll' has been associated to no taxonomy
|
||||
// reference field.
|
||||
$instances = $this->instanceVocabularies('node', 'poll');
|
||||
$this->assertTrue(empty($instances), t('Node type poll has no taxonomy term reference field instances.'));
|
||||
$this->assertTrue(empty($instances), 'Node type poll has no taxonomy term reference field instances.');
|
||||
|
||||
// Check that each node of type 'page' and 'story' is associated to all the
|
||||
// terms except terms whose ID is equal to the node ID or is equal to the
|
||||
@@ -147,14 +147,14 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
|
||||
if (!$should_be_displayed) {
|
||||
// Look for any link with the term path.
|
||||
$links = $this->xpath('//a[@href=:term_path]', array(':term_path' => $term_path));
|
||||
$this->assertFalse($links, t('Term %name (@field) is not displayed on node %nid', $args));
|
||||
$this->assertFalse($links, format_string('Term %name (@field) is not displayed on node %nid', $args));
|
||||
}
|
||||
else {
|
||||
// Look for a link with the term path inside the correct field.
|
||||
// We search for "SPACE + class + SPACE" to avoid matching a substring
|
||||
// of the class.
|
||||
$links = $this->xpath('//div[contains(concat(" ", normalize-space(@class), " "), :field_class)]//a[@href=:term_path]', array(':field_class' => ' ' . $field_class . ' ', ':term_path' => $term_path));
|
||||
$this->assertTrue($links, t('Term %name (@field) is displayed on node %nid', $args));
|
||||
$this->assertTrue($links, format_string('Term %name (@field) is displayed on node %nid', $args));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
|
||||
// ID 0. Make sure we ignored this instead of generating a bogus term.
|
||||
if ($node->nid == 1) {
|
||||
$link = l($term->name, 'taxonomy/term/0');
|
||||
$this->assertNoRaw($link, t('Bogus term (tid 0) is not displayed on node 1 vid %old_vid.', $args));
|
||||
$this->assertNoRaw($link, format_string('Bogus term (tid 0) is not displayed on node 1 vid %old_vid.', $args));
|
||||
}
|
||||
|
||||
// The first 12 nodes have two revisions. For nodes with
|
||||
@@ -170,7 +170,7 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
|
||||
// to terms whose ID is equal to the node ID or 49 less the node ID.
|
||||
$revisions = node_revision_list($node);
|
||||
if ($node->nid < 13) {
|
||||
$this->assertEqual(count($revisions), 2, t('Node %nid has two revisions.', $args));
|
||||
$this->assertEqual(count($revisions), 2, format_string('Node %nid has two revisions.', $args));
|
||||
$last_rev = end($revisions);
|
||||
$args['%old_vid'] = $last_rev->vid;
|
||||
|
||||
@@ -183,13 +183,13 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
|
||||
|
||||
$term = $terms[$node->nid];
|
||||
$link = l($term->name, 'taxonomy/term/' . $term->tid);
|
||||
$this->assertRaw($link, t('Term %name (@field) is displayed on node %nid vid %old_vid.', $args));
|
||||
$this->assertRaw($link, format_string('Term %name (@field) is displayed on node %nid vid %old_vid.', $args));
|
||||
$term = $terms[49-$node->nid];
|
||||
$link = l($term->name, 'taxonomy/term/' . $term->tid);
|
||||
$this->assertRaw($link, t('Term %name (@field) is displayed on node %nid %old_vid.', $args));
|
||||
$this->assertRaw($link, format_string('Term %name (@field) is displayed on node %nid %old_vid.', $args));
|
||||
}
|
||||
else {
|
||||
$this->assertEqual(count($revisions), 1, t('Node %nid has one revision.', $args));
|
||||
$this->assertEqual(count($revisions), 1, format_string('Node %nid has one revision.', $args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -256,7 +256,7 @@ abstract class UpgradePathTestCase extends DrupalWebTestCase {
|
||||
// Check if there still are pending updates.
|
||||
$this->drupalGet($update_url, array('external' => TRUE));
|
||||
$this->drupalPost(NULL, array(), t('Continue'));
|
||||
if (!$this->assertText(t('No pending updates.'), t('No pending updates at the end of the update process.'))) {
|
||||
if (!$this->assertText(t('No pending updates.'), 'No pending updates at the end of the update process.')) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -358,14 +358,14 @@ class BasicUpgradePath extends UpgradePathTestCase {
|
||||
// Destroy a table that the upgrade process needs.
|
||||
db_drop_table('access');
|
||||
// Assert that the upgrade fails.
|
||||
$this->assertFalse($this->performUpgrade(FALSE) && $this->pendingUpdates, t('A failed upgrade should return messages.'));
|
||||
$this->assertFalse($this->performUpgrade(FALSE) && $this->pendingUpdates, 'A failed upgrade should return messages.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test a successful upgrade.
|
||||
*/
|
||||
public function testBasicUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Hit the frontpage.
|
||||
$this->drupalGet('');
|
||||
@@ -374,7 +374,7 @@ class BasicUpgradePath extends UpgradePathTestCase {
|
||||
// Verify that we are still logged in.
|
||||
$this->drupalGet('user');
|
||||
$this->clickLink(t('Edit'));
|
||||
$this->assertEqual($this->getUrl(), url('user/1/edit', array('absolute' => TRUE)), t('We are still logged in as admin at the end of the upgrade.'));
|
||||
$this->assertEqual($this->getUrl(), url('user/1/edit', array('absolute' => TRUE)), 'We are still logged in as admin at the end of the upgrade.');
|
||||
|
||||
// Logout and verify that we can login back in with our initial password.
|
||||
$this->drupalLogout();
|
||||
@@ -394,7 +394,7 @@ class BasicUpgradePath extends UpgradePathTestCase {
|
||||
));
|
||||
|
||||
// Test that the site name is correctly displayed.
|
||||
$this->assertText('Drupal 6', t('The site name is correctly displayed.'));
|
||||
$this->assertText('Drupal 6', 'The site name is correctly displayed.');
|
||||
|
||||
// Verify that the main admin sections are available.
|
||||
$this->drupalGet('admin');
|
||||
@@ -408,11 +408,11 @@ class BasicUpgradePath extends UpgradePathTestCase {
|
||||
|
||||
// Confirm that no {menu_links} entry exists for user/autocomplete.
|
||||
$result = db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = :user_autocomplete', array(':user_autocomplete' => 'user/autocomplete'))->fetchField();
|
||||
$this->assertFalse($result, t('No {menu_links} entry exists for user/autocomplete'));
|
||||
$this->assertFalse($result, 'No {menu_links} entry exists for user/autocomplete');
|
||||
|
||||
// Test that the environment after the upgrade is in a consistent status.
|
||||
$update_d6 = variable_get('update_d6', FALSE);
|
||||
$this->assertFalse($update_d6, t('The D6 upgrade flag variable has been correctly disabled.'));
|
||||
$this->assertFalse($update_d6, 'The D6 upgrade flag variable has been correctly disabled.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ class BasicStandardUpdatePath extends UpdatePathTestCase {
|
||||
* Tests a successful point release update.
|
||||
*/
|
||||
public function testBasicStandardUpdate() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Hit the frontpage.
|
||||
$this->drupalGet('');
|
||||
@@ -455,7 +455,7 @@ class BasicStandardUpdatePath extends UpdatePathTestCase {
|
||||
// Verify that we are still logged in.
|
||||
$this->drupalGet('user');
|
||||
$this->clickLink(t('Edit'));
|
||||
$this->assertEqual($this->getUrl(), url('user/1/edit', array('absolute' => TRUE)), t('We are still logged in as admin at the end of the upgrade.'));
|
||||
$this->assertEqual($this->getUrl(), url('user/1/edit', array('absolute' => TRUE)), 'We are still logged in as admin at the end of the upgrade.');
|
||||
|
||||
// Logout and verify that we can login back in with our initial password.
|
||||
$this->drupalLogout();
|
||||
@@ -475,7 +475,7 @@ class BasicStandardUpdatePath extends UpdatePathTestCase {
|
||||
));
|
||||
|
||||
// Test that the site name is correctly displayed.
|
||||
$this->assertText('Drupal', t('The site name is correctly displayed.'));
|
||||
$this->assertText('Drupal', 'The site name is correctly displayed.');
|
||||
|
||||
// Verify that the main admin sections are available.
|
||||
$this->drupalGet('admin');
|
||||
@@ -489,7 +489,7 @@ class BasicStandardUpdatePath extends UpdatePathTestCase {
|
||||
|
||||
// Confirm that no {menu_links} entry exists for user/autocomplete.
|
||||
$result = db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = :user_autocomplete', array(':user_autocomplete' => 'user/autocomplete'))->fetchField();
|
||||
$this->assertFalse($result, t('No {menu_links} entry exists for user/autocomplete'));
|
||||
$this->assertFalse($result, 'No {menu_links} entry exists for user/autocomplete');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,7 +522,7 @@ class BasicMinimalUpdatePath extends UpdatePathTestCase {
|
||||
* Tests a successful point release update.
|
||||
*/
|
||||
public function testBasicMinimalUpdate() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Hit the frontpage.
|
||||
$this->drupalGet('');
|
||||
@@ -531,7 +531,7 @@ class BasicMinimalUpdatePath extends UpdatePathTestCase {
|
||||
// Verify that we are still logged in.
|
||||
$this->drupalGet('user');
|
||||
$this->clickLink(t('Edit'));
|
||||
$this->assertEqual($this->getUrl(), url('user/1/edit', array('absolute' => TRUE)), t('We are still logged in as admin at the end of the upgrade.'));
|
||||
$this->assertEqual($this->getUrl(), url('user/1/edit', array('absolute' => TRUE)), 'We are still logged in as admin at the end of the upgrade.');
|
||||
|
||||
// Logout and verify that we can login back in with our initial password.
|
||||
$this->drupalLogout();
|
||||
@@ -551,7 +551,7 @@ class BasicMinimalUpdatePath extends UpdatePathTestCase {
|
||||
));
|
||||
|
||||
// Test that the site name is correctly displayed.
|
||||
$this->assertText('Drupal', t('The site name is correctly displayed.'));
|
||||
$this->assertText('Drupal', 'The site name is correctly displayed.');
|
||||
|
||||
// Verify that the main admin sections are available.
|
||||
$this->drupalGet('admin');
|
||||
@@ -565,7 +565,7 @@ class BasicMinimalUpdatePath extends UpdatePathTestCase {
|
||||
|
||||
// Confirm that no {menu_links} entry exists for user/autocomplete.
|
||||
$result = db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = :user_autocomplete', array(':user_autocomplete' => 'user/autocomplete'))->fetchField();
|
||||
$this->assertFalse($result, t('No {menu_links} entry exists for user/autocomplete'));
|
||||
$this->assertFalse($result, 'No {menu_links} entry exists for user/autocomplete');
|
||||
|
||||
// Confirm that a date format that just differs in the case can be added.
|
||||
$admin_date_format = 'j M y';
|
||||
@@ -613,7 +613,7 @@ class FilledStandardUpdatePath extends UpdatePathTestCase {
|
||||
* Tests a successful point release update.
|
||||
*/
|
||||
public function testFilledStandardUpdate() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Hit the frontpage.
|
||||
$this->drupalGet('');
|
||||
@@ -622,7 +622,7 @@ class FilledStandardUpdatePath extends UpdatePathTestCase {
|
||||
// Verify that we are still logged in.
|
||||
$this->drupalGet('user');
|
||||
$this->clickLink(t('Edit'));
|
||||
$this->assertEqual($this->getUrl(), url('user/1/edit', array('absolute' => TRUE)), t('We are still logged in as admin at the end of the upgrade.'));
|
||||
$this->assertEqual($this->getUrl(), url('user/1/edit', array('absolute' => TRUE)), 'We are still logged in as admin at the end of the upgrade.');
|
||||
|
||||
// Logout and verify that we can login back in with our initial password.
|
||||
$this->drupalLogout();
|
||||
@@ -642,7 +642,7 @@ class FilledStandardUpdatePath extends UpdatePathTestCase {
|
||||
));
|
||||
|
||||
// Test that the site name is correctly displayed.
|
||||
$this->assertText('Drupal', t('The site name is correctly displayed.'));
|
||||
$this->assertText('Drupal', 'The site name is correctly displayed.');
|
||||
|
||||
// Verify that the main admin sections are available.
|
||||
$this->drupalGet('admin');
|
||||
@@ -656,7 +656,7 @@ class FilledStandardUpdatePath extends UpdatePathTestCase {
|
||||
|
||||
// Confirm that no {menu_links} entry exists for user/autocomplete.
|
||||
$result = db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = :user_autocomplete', array(':user_autocomplete' => 'user/autocomplete'))->fetchField();
|
||||
$this->assertFalse($result, t('No {menu_links} entry exists for user/autocomplete'));
|
||||
$this->assertFalse($result, 'No {menu_links} entry exists for user/autocomplete');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -689,7 +689,7 @@ class FilledMinimalUpdatePath extends UpdatePathTestCase {
|
||||
* Tests a successful point release update.
|
||||
*/
|
||||
public function testFilledStandardUpdate() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// Hit the frontpage.
|
||||
$this->drupalGet('');
|
||||
@@ -698,7 +698,7 @@ class FilledMinimalUpdatePath extends UpdatePathTestCase {
|
||||
// Verify that we are still logged in.
|
||||
$this->drupalGet('user');
|
||||
$this->clickLink(t('Edit'));
|
||||
$this->assertEqual($this->getUrl(), url('user/1/edit', array('absolute' => TRUE)), t('We are still logged in as admin at the end of the upgrade.'));
|
||||
$this->assertEqual($this->getUrl(), url('user/1/edit', array('absolute' => TRUE)), 'We are still logged in as admin at the end of the upgrade.');
|
||||
|
||||
// Logout and verify that we can login back in with our initial password.
|
||||
$this->drupalLogout();
|
||||
@@ -718,7 +718,7 @@ class FilledMinimalUpdatePath extends UpdatePathTestCase {
|
||||
));
|
||||
|
||||
// Test that the site name is correctly displayed.
|
||||
$this->assertText('Drupal', t('The site name is correctly displayed.'));
|
||||
$this->assertText('Drupal', 'The site name is correctly displayed.');
|
||||
|
||||
// Verify that the main admin sections are available.
|
||||
$this->drupalGet('admin');
|
||||
@@ -732,6 +732,6 @@ class FilledMinimalUpdatePath extends UpdatePathTestCase {
|
||||
|
||||
// Confirm that no {menu_links} entry exists for user/autocomplete.
|
||||
$result = db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = :user_autocomplete', array(':user_autocomplete' => 'user/autocomplete'))->fetchField();
|
||||
$this->assertFalse($result, t('No {menu_links} entry exists for user/autocomplete'));
|
||||
$this->assertFalse($result, 'No {menu_links} entry exists for user/autocomplete');
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ class TranslatableUpgradePathTestCase extends UpgradePathTestCase {
|
||||
* Test a successful upgrade (no negotiation).
|
||||
*/
|
||||
public function testTranslatableUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
|
||||
// The D6 database contains the english node "First translatable page" with
|
||||
// nid 53.
|
||||
@@ -39,12 +39,12 @@ class TranslatableUpgradePathTestCase extends UpgradePathTestCase {
|
||||
|
||||
// Check whether the node displays properly.
|
||||
$this->drupalGet("node/$nid");
|
||||
$this->assertText($body, t('Translatable node body displays properly'));
|
||||
$this->assertText($body, 'Translatable node body displays properly');
|
||||
|
||||
// Retrieve node object, ensure that both the body and the teaser has
|
||||
// survived upgrade properly.
|
||||
$node = $this->drupalGetNodeByTitle($title);
|
||||
$this->assertTrue($node != NULL, t('Node @title was loaded', array('@title' => $title)));
|
||||
$this->assertTrue($node != NULL, format_string('Node @title was loaded', array('@title' => $title)));
|
||||
$this->assertEqual($node->body[LANGUAGE_NONE][0]['value'], $body, 'Body of the node survived upgrade properly');
|
||||
$this->assertEqual($node->body[LANGUAGE_NONE][0]['summary'], $teaser, 'Teaser of the node survived upgrade properly');
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ class UpgradePathTriggerTestCase extends UpgradePathTestCase {
|
||||
* Basic tests for the trigger upgrade.
|
||||
*/
|
||||
public function testTaxonomyUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
$this->drupalGet('admin/structure/trigger/node');
|
||||
$this->assertRaw('<td>'. t('Make post sticky') .'</td>');
|
||||
$this->assertRaw('<td>'. t('Publish post') .'</td>');
|
||||
|
@@ -29,7 +29,7 @@ class UploadUpgradePathTestCase extends UpgradePathTestCase {
|
||||
* Test a successful upgrade.
|
||||
*/
|
||||
public function testUploadUpgrade() {
|
||||
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
|
||||
$this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
|
||||
$query = new EntityFieldQuery();
|
||||
$query->entityCondition('entity_type', 'node');
|
||||
$query->entityCondition('bundle', 'page');
|
||||
|
Reference in New Issue
Block a user