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.test, line 152

Class

QuizPageTestCase

Code

public 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;
}