4 * Contains \Drupal\Console\Test\Command\GeneratorServiceCommandTest.
7 namespace Drupal\Console\Test\Command\Generate;
9 use Drupal\Console\Command\Generate\ServiceCommand;
10 use Symfony\Component\Console\Tester\CommandTester;
11 use Drupal\Console\Test\DataProvider\ServiceDataProviderTrait;
12 use Drupal\Console\Test\Command\GenerateCommandTest;
14 class ServiceCommandTest extends GenerateCommandTest
16 use ServiceDataProviderTrait;
19 * Service generator test
26 * @param $path_service
28 * @dataProvider commandData
30 public function testGenerateService(
38 $command = new ServiceCommand($this->getHelperSet());
39 $command->setHelperSet($this->getHelperSet());
40 $command->setGenerator($this->getGenerator());
42 $commandTester = new CommandTester($command);
44 $this->markTestIncomplete(
45 'This test has not been implemented yet.'
48 $code = $commandTester->execute(
50 '--module' => $module,
53 '--interface' => $interface,
54 '--services' => $services,
55 '--path_service' => $path_service,
57 ['interactive' => false]
60 $this->assertEquals(0, $code);
63 private function getGenerator()
66 ->getMockBuilder('Drupal\Console\Generator\ServiceGenerator')
67 ->disableOriginalConstructor()
68 ->setMethods(['generate'])