public function QuizPageTestCase::testCreateQuizQuestion in Quiz 8.5
Same name in this branch
- 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()
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()
- 7.6 question_types/quiz_page/QuizPageTestCase.test \QuizPageTestCase::testCreateQuizQuestion()
- 7.5 question_types/quiz_page/QuizPageTestCase.test \QuizPageTestCase::testCreateQuizQuestion()
Test adding and taking a quiz page question.
File
- question_types/
quiz_page/ tests/ src/ Functional/ QuizPageTestCase.php, line 137
Class
- QuizPageTestCase
- Test quiz page behavior.
Code
public function testCreateQuizQuestion($settings = array()) {
// Login as our privileged user.
$this
->drupalLogin($this->admin);
$question_node = $this
->createQuestion(array(
'type' => $this
->getQuestionType(),
'title' => 'PG 1 title',
'body' => 'PG 1 body text.',
) + $settings);
return $question_node;
}