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