function DevelGenerateCommandsTest::testDrushGenerateVocabs

Same name and namespace in other branches
  1. 4.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 112

Class

DevelGenerateCommandsTest
Test class for the Devel Generate drush commands.

Namespace

Drupal\Tests\devel_generate\Functional

Code

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