You are here

public function DevelGenerateBrowserTest::testDevelGenerateVocabs in Devel 4.x

Same name and namespace in other branches
  1. 8.3 devel_generate/tests/src/Functional/DevelGenerateBrowserTest.php \Drupal\Tests\devel_generate\Functional\DevelGenerateBrowserTest::testDevelGenerateVocabs()

Tests generating vocabularies.

File

devel_generate/tests/src/Functional/DevelGenerateBrowserTest.php, line 268

Class

DevelGenerateBrowserTest
Tests the logic to generate data.

Namespace

Drupal\Tests\devel_generate\Functional

Code

public function testDevelGenerateVocabs() {
  $edit = [
    'num' => 5,
    'title_length' => 12,
    'kill' => TRUE,
  ];
  $this
    ->drupalPostForm('admin/config/development/generate/vocabs', $edit, 'Generate');
  $this
    ->assertSession()
    ->pageTextContains('Created the following new vocabularies: ');
  $this
    ->assertSession()
    ->pageTextContains('Generate process complete.');
}