diff --git a/src/Robo/Commands/Setup/WizardCommand.php b/src/Robo/Commands/Setup/WizardCommand.php index 6acfdd67e9..0eccd56e98 100644 --- a/src/Robo/Commands/Setup/WizardCommand.php +++ b/src/Robo/Commands/Setup/WizardCommand.php @@ -48,7 +48,7 @@ public function wizard($options = [ } if ($answers['vm']) { - $this->invokeCommand('vm', '--yes'); + $this->invokeCommand('vm', ['--yes']); } } diff --git a/src/Robo/Config/ProjectConfiguration.php b/src/Robo/Config/ProjectConfiguration.php index 8d40beebb5..8099dfcd92 100644 --- a/src/Robo/Config/ProjectConfiguration.php +++ b/src/Robo/Config/ProjectConfiguration.php @@ -12,7 +12,7 @@ class ProjectConfiguration implements ConfigurationInterface { public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('project'); + $rootNode = $treeBuilder->root('recipe'); // @codingStandardsIgnoreStart $rootNode diff --git a/tests/phpunit/BltProject/WizardTest.php b/tests/phpunit/BltProject/WizardTest.php new file mode 100644 index 0000000000..1ed5631b77 --- /dev/null +++ b/tests/phpunit/BltProject/WizardTest.php @@ -0,0 +1,34 @@ +bltDirectory . '/tests/phpunit/fixtures/recipe.yml'; + $this->blt("wizard", [ + '--recipe' => $recipe_filepath, + '--yes' => '', + ]); + + $recipe = Yaml::parseFile($recipe_filepath); + $project_configuration = Yaml::parseFile($this->bltDirectory . '/blt/blt.yml'); + + $this->assertEquals($recipe['human_name'], $project_configuration['project']['human_name']); + $this->assertEquals($recipe['machine_name'], $project_configuration['project']['machine_name']); + $this->assertEquals($recipe['prefix'], $project_configuration['project']['prefix']); + $this->assertEquals($recipe['human_name'], $project_configuration['project']['human_name']); + $this->assertFileExists($this->bltDirectory . '/acquia-pipelines'); + $this->assertFileNotExists($this->bltDirectory . '/Vagrantfile'); + } + +} diff --git a/tests/phpunit/fixtures/recipe.yml b/tests/phpunit/fixtures/recipe.yml new file mode 100644 index 0000000000..61a814d49d --- /dev/null +++ b/tests/phpunit/fixtures/recipe.yml @@ -0,0 +1,7 @@ +human_name: "TEST PROJECT" +machine_name: TEST +profile: standard +prefix: TST +vm: false +ci: + provider: pipelines