summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/upgrade
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-08-05 23:26:36 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-08-05 23:26:36 +0000
commitcacd044a6398df92de68c5aea31987ac0fff507a (patch)
tree41305d208c037ae0aad0c68fb23beb66715f145a /modules/simpletest/tests/upgrade
parentefbf061c8142c201967389eac42e8284dfa9aff9 (diff)
downloadbrdo-cacd044a6398df92de68c5aea31987ac0fff507a.tar.gz
brdo-cacd044a6398df92de68c5aea31987ac0fff507a.tar.bz2
#500866 by boombatower, solotandem: Remove t() from assertion messages in SimpleTest, so translators do not get 1000s of bogus strings.
Diffstat (limited to 'modules/simpletest/tests/upgrade')
-rw-r--r--modules/simpletest/tests/upgrade/upgrade.poll.test14
-rw-r--r--modules/simpletest/tests/upgrade/upgrade.test13
2 files changed, 15 insertions, 12 deletions
diff --git a/modules/simpletest/tests/upgrade/upgrade.poll.test b/modules/simpletest/tests/upgrade/upgrade.poll.test
index b1df28283..24245e4e4 100644
--- a/modules/simpletest/tests/upgrade/upgrade.poll.test
+++ b/modules/simpletest/tests/upgrade/upgrade.poll.test
@@ -31,7 +31,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');
@@ -43,22 +43,24 @@ 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);
+ $nbvotes = floor(($i % 4) + 5);
$elements = $this->xpath("//div[@class='percent']");
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]));
+ if (($nbvotes % $nbchoices) > $c) {
+ $votes++;
+ }
+ $this->assertTrue(preg_match("/$votes vote/", $elements[$c]), 'The number of votes is displayed correctly: expected ' . $votes . ', got ' . $elements[$c]);
}
}
}
diff --git a/modules/simpletest/tests/upgrade/upgrade.test b/modules/simpletest/tests/upgrade/upgrade.test
index d0a3bc885..1d134f278 100644
--- a/modules/simpletest/tests/upgrade/upgrade.test
+++ b/modules/simpletest/tests/upgrade/upgrade.test
@@ -197,7 +197,8 @@ abstract class UpgradePathTestCase extends DrupalWebTestCase {
}
// Since cache_bootstrap won't exist in a Drupal 6 site, ignore the
// exception if the above fails.
- catch (Exception $e) {}
+ catch (Exception $e) {
+ }
}
/**
@@ -257,7 +258,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;
}
@@ -340,14 +341,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), t('A failed upgrade should return messages.'));
+ $this->assertFalse($this->performUpgrade(FALSE), '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('');
@@ -356,7 +357,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();
@@ -367,7 +368,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');