You are here

public function QuizCreationTest::testQuizCreation in Quiz 8.5

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

Test basic quiz creation.

File

tests/src/Functional/QuizCreationTest.php, line 17

Class

QuizCreationTest
Test aspects of quiz creation including global and user defaults.

Namespace

Drupal\Tests\quiz\Functional

Code

public function testQuizCreation() {
  $this
    ->drupalLogin($this->admin);
  $this
    ->drupalGet("quiz/add/quiz");
  $this
    ->drupalPostForm(NULL, array(
    'title[0][value]' => 'Test quiz creation',
    'body[0][value]' => 'Test quiz description',
  ), t('Save'));
  $this
    ->assertText('Manage questions');
}