You are here

public function QuizPageTestCase::testCreateQuizQuestion in Quiz 8.6

Same name in this branch
  1. 8.6 question_types/quiz_page/tests/src/Functional/QuizPageTestCase.php \QuizPageTestCase::testCreateQuizQuestion()
  2. 8.6 question_types/quiz_page/tests/src/Functional/QuizPageTestCase.test \QuizPageTestCase::testCreateQuizQuestion()
Same name and namespace in other branches
  1. 8.5 question_types/quiz_page/tests/src/Functional/QuizPageTestCase.php \QuizPageTestCase::testCreateQuizQuestion()
  2. 8.5 question_types/quiz_page/tests/src/Functional/QuizPageTestCase.test \QuizPageTestCase::testCreateQuizQuestion()
  3. 7.6 question_types/quiz_page/QuizPageTestCase.test \QuizPageTestCase::testCreateQuizQuestion()
  4. 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;
}