You are here

public function TrueFalseTestCase::testCreateQuizQuestion in Quiz 7.5

Same name and namespace in other branches
  1. 7.6 question_types/truefalse/truefalse.test \TrueFalseTestCase::testCreateQuizQuestion()

Test adding and taking a truefalse question.

Overrides QuizQuestionTestCase::testCreateQuizQuestion

3 calls to TrueFalseTestCase::testCreateQuizQuestion()
TrueFalseTestCase::testEditQuestionResponse in question_types/truefalse/truefalse.test
Test that the question response can be edited.
TrueFalseTestCase::testQuestionFeedback in question_types/truefalse/truefalse.test
Test incorrect question with all feedbacks on.
TrueFalseTestCase::testTakeQuestion in question_types/truefalse/truefalse.test

File

question_types/truefalse/truefalse.test, line 30
Unit tests for the truefalse Module.

Class

TrueFalseTestCase
Test class for true false questions.

Code

public function testCreateQuizQuestion() {

  // Login as our privileged user.
  $this
    ->drupalLogin($this->admin);
  $question_node = $this
    ->drupalCreateNode(array(
    'type' => 'truefalse',
    'title' => 'TF 1 title',
    'correct_answer' => 1,
    'body' => array(
      LANGUAGE_NONE => array(
        array(
          'value' => 'TF 1 body text',
        ),
      ),
    ),
  ));
  return $question_node;
}