4 * Contains \Drupal\Console\Test\Command\GenerateEntityBundleCommandTest.
7 namespace Drupal\Console\Test\Command;
9 use Drupal\Console\Command\Generate\EntityBundleCommand;
10 use Symfony\Component\Console\Tester\CommandTester;
11 use Drupal\Console\Test\DataProvider\EntityBundleDataProviderTrait;
13 class GenerateEntityBundleCommandTest extends GenerateCommandTest
15 use EntityBundleDataProviderTrait;
18 * ContentType generator test
22 * @param $bundle_title
24 * @dataProvider commandData
26 public function testGenerateContentType(
31 $command = new EntityBundleCommand($this->getHelperSet());
32 $command->setHelperSet($this->getHelperSet());
33 $command->setGenerator($this->getGenerator());
35 $commandTester = new CommandTester($command);
37 $code = $commandTester->execute(
39 '--module' => $module,
40 '--bundle-name' => $bundle_name,
41 '--bundle-title' => $bundle_title
43 ['interactive' => false]
46 $this->assertEquals(0, $code);
49 private function getGenerator()
52 ->getMockBuilder('Drupal\Console\Generator\EntityBundleGenerator')
53 ->disableOriginalConstructor()
54 ->setMethods(['generate'])