X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2FTest%2FCommand%2FGeneratorPluginConditionCommandTest.php;fp=vendor%2Fdrupal%2Fconsole%2FTest%2FCommand%2FGeneratorPluginConditionCommandTest.php;h=7f88b35757074f5ca9610edc850659d909db0d38;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/drupal/console/Test/Command/GeneratorPluginConditionCommandTest.php b/vendor/drupal/console/Test/Command/GeneratorPluginConditionCommandTest.php new file mode 100644 index 000000000..7f88b3575 --- /dev/null +++ b/vendor/drupal/console/Test/Command/GeneratorPluginConditionCommandTest.php @@ -0,0 +1,69 @@ +getHelperSet()); + $command->setHelperSet($this->getHelperSet()); + $command->setGenerator($this->getGenerator()); + + $commandTester = new CommandTester($command); + + $code = $commandTester->execute( + [ + '--module' => $module, + '--class' => $class_name, + '--label' => $label, + '--plugin-id' => $plugin_id, + '--context-definition-id' => $context_definition_id, + '--context-definition-label' => $context_definition_label, + '--context-definition-required' => $context_definition_required + ], + ['interactive' => false] + ); + + $this->assertEquals(0, $code); + } + + private function getGenerator() + { + return $this + ->getMockBuilder('Drupal\Console\Generator\PluginConditionGenerator') + ->disableOriginalConstructor() + ->setMethods(['generate']) + ->getMock(); + } +}