You are here

public function QuizQuestionTestBase::setUp in Quiz 8.5

Same name and namespace in other branches
  1. 8.6 tests/src/Functional/QuizQuestionTestBase.php \Drupal\Tests\quiz\Functional\QuizQuestionTestBase::setUp()
  2. 6.x tests/src/Functional/QuizQuestionTestBase.php \Drupal\Tests\quiz\Functional\QuizQuestionTestBase::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 QuizTestBase::setUp

1 call to QuizQuestionTestBase::setUp()
QuizPageTestCase::setUp in question_types/quiz_page/tests/src/Functional/QuizPageTestCase.test
Set up a question test case.
1 method overrides QuizQuestionTestBase::setUp()
QuizPageTestCase::setUp in question_types/quiz_page/tests/src/Functional/QuizPageTestCase.test
Set up a question test case.

File

tests/src/Functional/QuizQuestionTestBase.php, line 29
Unit tests for the quiz question Module.

Class

QuizQuestionTestBase
Base test class for Quiz questions.

Namespace

Drupal\Tests\quiz\Functional

Code

public function setUp($admin_permissions = array(), $user_permissions = array()) {
  $admin_permissions[] = "create {$this->getQuestionType()} quiz_question";
  $admin_permissions[] = "update {$this->getQuestionType()} quiz_question";
  parent::setUp($admin_permissions, $user_permissions);
}