Skip to content

Add 2 Drush generators for quickly scaffolding test classes

Moshe Weitzman requested to merge generators into 2.x

Adds a PSR4 generator for ExistingSiteBase and another for ExistingSiteSelenium2DriverTestBase. After generating, the user has a test class ready to be edited in the module directory of her choosing.

Lets leave testing of this feature for a future MR. We'd need to generate classes via Drush and then execute what we generated (which would just duplicate what our current Example tests do).

❯ drush gen test:existing-s2

 Welcome to test:existing-s2 generator!
––––––––––––––––––––––––––––––––––––––––

 Module machine name [docroot]:
 ➤ mass_admin_pages

 Class [MassAdminPagesTest]:
 ➤ Map2Test

 The following directories and files have been created or updated:
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
 • /var/www/html/docroot/modules/custom/mass_admin_pages/tests/src/ExistingSiteJavascript/Map2Test.php
Edited by Moshe Weitzman

Merge request reports

Loading