function QuizPageTestCase::testCreateQuizQuestion in Quiz 7.6
Same name and namespace in other branches
- 8.6 question_types/quiz_page/tests/src/Functional/QuizPageTestCase.php \QuizPageTestCase::testCreateQuizQuestion()
- 8.6 question_types/quiz_page/tests/src/Functional/QuizPageTestCase.test \QuizPageTestCase::testCreateQuizQuestion()
- 8.5 question_types/quiz_page/tests/src/Functional/QuizPageTestCase.php \QuizPageTestCase::testCreateQuizQuestion()
- 8.5 question_types/quiz_page/tests/src/Functional/QuizPageTestCase.test \QuizPageTestCase::testCreateQuizQuestion()
- 7.5 question_types/quiz_page/QuizPageTestCase.test \QuizPageTestCase::testCreateQuizQuestion()
Test adding and taking a quiz page question.
Overrides QuizQuestionTestCase::testCreateQuizQuestion
File
- question_types/
quiz_page/ QuizPageTestCase.test, line 146
Class
Code
function testCreateQuizQuestion($settings = array()) {
// Login as our privileged user.
$this
->drupalLogin($this->admin);
$question_node = $this
->drupalCreateNode(array(
'type' => $this->question_node_type,
'title' => 'PG 1 title',
'body' => array(
LANGUAGE_NONE => array(
array(
'value' => 'PG 1 body text.',
),
),
),
) + $settings);
return $question_node;
}