public function QuizPageTestCase::testCreateQuizQuestion in Quiz 6.x
Test adding and taking a quiz page question.
File
- question_types/
quiz_page/ tests/ src/ Functional/ QuizPageTestCase.php, line 163
Class
- QuizPageTestCase
- Test quiz page behavior.
Namespace
Drupal\Tests\quiz_page\FunctionalCode
public function testCreateQuizQuestion($settings = []) {
// Login as our privileged user.
$this
->drupalLogin($this->admin);
$question_node = $this
->createQuestion([
'type' => $this
->getQuestionType(),
'title' => 'PG 1 title',
'body' => 'PG 1 body text.',
] + $settings);
return $question_node;
}