X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2FTest%2FGenerator%2FPluginTypeYamlGeneratorTest.php;fp=vendor%2Fdrupal%2Fconsole%2FTest%2FGenerator%2FPluginTypeYamlGeneratorTest.php;h=0dc2279e27fd964a223a455b29ea40cbd6ba6a5d;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/drupal/console/Test/Generator/PluginTypeYamlGeneratorTest.php b/vendor/drupal/console/Test/Generator/PluginTypeYamlGeneratorTest.php new file mode 100644 index 000000000..0dc2279e2 --- /dev/null +++ b/vendor/drupal/console/Test/Generator/PluginTypeYamlGeneratorTest.php @@ -0,0 +1,58 @@ +getRenderHelper()->setSkeletonDirs($this->getSkeletonDirs()); + $this->getRenderHelper()->setTranslator($this->getTranslatorHelper()); + $generator->setHelperSet($this->getHelperSet()); + + $generator->generate( + $module, + $plugin_class, + $plugin_name, + $plugin_file_name + ); + + $files = [ + $generator->getSite()->getSourcePath($module) . '/' . $plugin_class . 'Manager.php', + $generator->getSite()->getSourcePath($module) . '/' . $plugin_class . 'ManagerInterface.php', + $generator->getSite()->getModulePath($module) . '/' . $module . '.services.yml', + $generator->getSite()->getModulePath($module) . '/' . $module . '.' . $plugin_file_name . '.yml' + ]; + + foreach ($files as $file) { + $this->assertTrue( + file_exists($file), + sprintf('%s does not exist', $file) + ); + } + } +}