function DevelGenerateCommandsTest::testDrushGenerateVocabs

Same name in other branches
  1. 5.x devel_generate/tests/src/Functional/DevelGenerateCommandsTest.php \Drupal\Tests\devel_generate\Functional\DevelGenerateCommandsTest::testDrushGenerateVocabs()

Tests generating vocabularies.

File

devel_generate/tests/src/Functional/DevelGenerateCommandsTest.php, line 104

Class

DevelGenerateCommandsTest
Test class for the Devel Generate drush commands.

Namespace

Drupal\Tests\devel_generate\Functional

Code

public function testDrushGenerateVocabs() {
    // Make sure vocabs get created.
    $this->drush('devel-generate-vocabs', [
        5,
    ], [
        'kill' => NULL,
    ]);
    $vocabs = Vocabulary::loadMultiple();
    $this->assertGreaterThan(4, count($vocabs));
    $vocab = array_pop($vocabs);
    $this->assertNotEmpty($vocab);
}