You are here

function TrueFalseTestCase::testCreateQuizQuestion in Quiz 7.6

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

Test adding and taking a truefalse question.

Overrides QuizQuestionTestCase::testCreateQuizQuestion

2 calls to TrueFalseTestCase::testCreateQuizQuestion()
TrueFalseTestCase::testQuestionFeedback in question_types/truefalse/truefalse.test
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

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;
}