summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlastair Aitchison2010-04-05 14:08:48 (GMT)
committer Alastair Aitchison2010-04-05 14:08:48 (GMT)
commit1f7239be5744e9629d05777dda35af6342cd4ae7 (patch)
tree2867526cd05c7d8ec548067e8ffe6d12a4c4484c
parentc7a94c1ea363321554837e4cb7bc6fcac8d93cc8 (diff)
by tanoshimi: Fixed minor style issues in test file.6.x-1.0
-rw-r--r--tests/question.test28
1 files changed, 15 insertions, 13 deletions
diff --git a/tests/question.test b/tests/question.test
index 58535b9..2b28f58 100644
--- a/tests/question.test
+++ b/tests/question.test
@@ -34,7 +34,7 @@ class QuestionTestCase extends DrupalWebTestCase {
* Verify the functionality of the Question module.
*/
function testQuestionWorkflow() {
-
+
// Check that unauthorised users cannot ask questions
$this->drupalGet('question');
$this->assertResponse(403, t('Make sure unauthorised users cannot access question form.'));
@@ -45,22 +45,24 @@ class QuestionTestCase extends DrupalWebTestCase {
$this->drupalPost(
'question',
array(
- 'questioner' => 'Bobby Test',
- 'question' => 'This is the test question asked by Bobby'),
- t('Submit Question')
- );
+ 'questioner' => 'Bobby Test',
+ 'question' => 'This is the test question asked by Bobby'
+ ),
+ t('Submit Question')
+ );
// Ask another question
$this->drupalPost(
'question',
array(
'questioner' => 'Benny Test',
- 'question' => 'This is another test question, this time asked by Benny'),
- t('Submit Question')
- );
+ 'question' => 'This is another test question, this time asked by Benny'
+ ),
+ t('Submit Question')
+ );
// Check that there are two questions in the database
$count = db_result(db_query('SELECT COUNT(*) FROM {question_queue}'));
$this->assertEqual($count, 2, t("There are two questions in the database."));
-
+
// Check that an unauthorised user cannot access the question queue
$this->drupalGet('admin/content/question');
$this->assertResponse(403, t('Make sure unauthorised users cannot access question queue.'));
@@ -70,7 +72,7 @@ class QuestionTestCase extends DrupalWebTestCase {
// Login as an admin user
$this->drupalLogin($this->question_admin_user);
-
+
// Check that the questions appear on the queue page
$this->drupalGet('admin/content/question');
$this->assertText("Bobby Test", t("Text 'Bobby Test' found in the question queue"));
@@ -100,7 +102,7 @@ class QuestionTestCase extends DrupalWebTestCase {
// Check that the question has been removed from the queue
$this->drupalGet('admin/content/question');
$this->assertNoText("Bobby Test", t("Text 'Bobby Test' does not appear in the question queue"));
-
+
// Check that the row has been removed from the database
$count = db_result(db_query('SELECT COUNT(*) FROM {question_queue}'));
$this->assertEqual($count, 1, t("There is one question in the question queue."));
@@ -110,9 +112,9 @@ class QuestionTestCase extends DrupalWebTestCase {
// Check that the question has been deleted
$this->assertRaw(t('!type deleted.', array('!type' => 'Question')), t('Question deleted.'));
-
+
// Check that the question queue is now empty
$count = db_result(db_query('SELECT COUNT(*) FROM {question_queue}'));
$this->assertEqual($count, 0, t("The question queue is empty."));
- }
+ }
}