You are here

public function QuizQuestionTestBase::testQuizQuestionImplementation in Quiz 8.5

Same name and namespace in other branches
  1. 8.6 tests/src/Functional/QuizQuestionTestBase.php \Drupal\Tests\quiz\Functional\QuizQuestionTestBase::testQuizQuestionImplementation()
  2. 6.x tests/src/Functional/QuizQuestionTestBase.php \Drupal\Tests\quiz\Functional\QuizQuestionTestBase::testQuizQuestionImplementation()

Test the subclass's quiz question implementation.

File

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

Class

QuizQuestionTestBase
Base test class for Quiz questions.

Namespace

Drupal\Tests\quiz\Functional

Code

public function testQuizQuestionImplementation() {
  $qq = Drupal::service('plugin.manager.quiz.question')
    ->getDefinitions();
  $this
    ->assertTrue(isset($qq[$this
    ->getQuestionType()]), t('Check that the question implementation is correct.'));
}