public function QuizDirectionsTestCase::testCreateQuizQuestion in Quiz 7.5
Same name and namespace in other branches
- 7.6 question_types/quiz_directions/QuizDirectionsTestCase.test \QuizDirectionsTestCase::testCreateQuizQuestion()
Test adding and taking a quiz directions question.
Overrides QuizQuestionTestCase::testCreateQuizQuestion
File
- question_types/
quiz_directions/ QuizDirectionsTestCase.test, line 30 - Unit tests for the short_answer Module.
Class
- QuizDirectionsTestCase
- Test class for short answer.
Code
public function testCreateQuizQuestion($settings = array()) {
// Login as our privileged user.
$this
->drupalLogin($this->admin);
$question_node = $this
->drupalCreateNode(array(
'type' => $this->question_node_type,
'title' => 'QD 1 title',
'body' => array(
LANGUAGE_NONE => array(
array(
'value' => 'QD 1 body text.',
),
),
),
) + $settings);
return $question_node;
}