public function ScaleTestCase::testCreateQuizQuestion in Quiz 7.6
Same name and namespace in other branches
- 8.6 question_types/quiz_scale/quiz_scale.test \ScaleTestCase::testCreateQuizQuestion()
- 8.5 question_types/quiz_scale/quiz_scale.test \ScaleTestCase::testCreateQuizQuestion()
- 7.5 question_types/scale/scale.test \ScaleTestCase::testCreateQuizQuestion()
Create a new question with default settings.
Overrides QuizQuestionTestCase::testCreateQuizQuestion
1 call to ScaleTestCase::testCreateQuizQuestion()
- ScaleTestCase::testTakeQuestion in question_types/
scale/ scale.test
File
- question_types/
scale/ scale.test, line 38 - Test suite for scale question type module.
Class
- ScaleTestCase
- Test class for scale questions.
Code
public function testCreateQuizQuestion() {
// Login as our privileged user.
$this
->drupalLogin($this->admin);
$settings = array();
$settings['type'] = 'scale';
$question_node = $this
->drupalCreateNode(array(
'type' => 'scale',
'title' => 'Scale 1 title',
'alternative0' => 'This is alternative 1',
'alternative1' => 'This is alternative 2',
'alternative2' => 'This is alternative 3',
'alternative3' => 'This is alternative 4',
'alternative4' => 'This is alternative 5',
'body' => array(
LANGUAGE_NONE => array(
array(
'value' => 'Scale 1 body text',
),
),
),
));
return $question_node;
}