public function QuizQuestionTestCase::setUp in Quiz 7.5
Same name and namespace in other branches
- 7.6 question_types/quiz_question/QuizQuestionTestCase.test \QuizQuestionTestCase::setUp()
Set up a question test case.
Parameters
array $modules: Array of modules to enable.
array $admin_permissions: Array of admin permissions to add.
array $user_permissions: Array of user permissions to add.
Return value
void|false
Overrides QuizTestCase::setUp
8 calls to QuizQuestionTestCase::setUp()
- LongAnswerTestCase::setUp in question_types/
long_answer/ long_answer.test - Set up a question test case.
- MatchingTestCase::setUp in question_types/
matching/ matching.test - Set up a question test case.
- MultichoiceTestCase::setUp in question_types/
multichoice/ multichoice.test - Set up a question test case.
- QuizDirectionsTestCase::setUp in question_types/
quiz_directions/ QuizDirectionsTestCase.test - Set up a question test case.
- QuizPageTestCase::setUp in question_types/
quiz_page/ QuizPageTestCase.test - Set up a question test case.
8 methods override QuizQuestionTestCase::setUp()
- LongAnswerTestCase::setUp in question_types/
long_answer/ long_answer.test - Set up a question test case.
- MatchingTestCase::setUp in question_types/
matching/ matching.test - Set up a question test case.
- MultichoiceTestCase::setUp in question_types/
multichoice/ multichoice.test - Set up a question test case.
- QuizDirectionsTestCase::setUp in question_types/
quiz_directions/ QuizDirectionsTestCase.test - Set up a question test case.
- QuizPageTestCase::setUp in question_types/
quiz_page/ QuizPageTestCase.test - Set up a question test case.
File
- question_types/
quiz_question/ QuizQuestionTestCase.test, line 27 - Unit tests for the quiz question Module.
Class
- QuizQuestionTestCase
- Base test class for Quiz questions.
Code
public function setUp($modules = array(), $admin_permissions = array(), $user_permissions = array()) {
$modules[] = 'quiz_question';
$admin_permissions[] = "create {$this->question_node_type} content";
$admin_permissions[] = "edit any {$this->question_node_type} content";
$user_permissions[] = 'access quiz';
parent::setUp($modules, $admin_permissions, $user_permissions);
}