You are here

public function QuizTestCase::drupalCreateQuiz in Quiz 7.5

Same name and namespace in other branches
  1. 7.6 tests/QuizTestCase.test \QuizTestCase::drupalCreateQuiz()
39 calls to QuizTestCase::drupalCreateQuiz()
MatchingTestCase::testChoicePenalty in question_types/matching/matching.test
Test if the penalty system for guessing wrong work.
MatchingTestCase::testTakeQuestion in question_types/matching/matching.test
Test using a matching question inside a quiz.
QuizAccessTestCase::testQuizOwnerResultEdit in tests/QuizAccessTestCase.test
Test quiz authors being able to score results for own quiz.
QuizFeedbackTestCase::testAnswerFeedback in tests/QuizFeedbackTestCase.test
Test question feedback.
QuizFeedbackTestCase::testFeedbackTimes in tests/QuizFeedbackTestCase.test
Test different feedback times.

... See full list

File

tests/QuizTestCase.test, line 115
Unit tests for the quiz question Module.

Class

QuizTestCase
Base test class for Quiz questions.

Code

public function drupalCreateQuiz($settings = array()) {
  $settings += array(
    'type' => 'quiz',
    'result_type' => 'quiz_result',
    'review_options' => array(
      'end' => drupal_map_assoc(array_keys(quiz_get_feedback_options())),
    ),
  );
  return $this
    ->drupalCreateNode($settings);
}