summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/upgrade/upgrade.poll.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/upgrade/upgrade.poll.test')
-rw-r--r--modules/simpletest/tests/upgrade/upgrade.poll.test14
1 files changed, 8 insertions, 6 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]);
}
}
}