getHelperSet()); $command->setHelperSet($this->getHelperSet()); $command->setGenerator($this->getGenerator()); $commandTester = new CommandTester($command); $code = $commandTester->execute( [ '--theme' => $theme, '--machine-name' => $machine_name, '--theme-path' => $theme_path, '--description' => $description, '--core' => $core, '--package' => $package, '--global-library' => $global_library, '--base-theme' => $base_theme, '--regions' => $regions, '--breakpoints' => $breakpoints ], ['interactive' => false] ); $this->assertEquals(0, $code); } private function getGenerator() { return $this ->getMockBuilder('Drupal\Console\Generator\ThemeGenerator') ->disableOriginalConstructor() ->setMethods(['generate']) ->getMock(); } }