0

I installed Drupal Console, put it on my path, ran drupal init, and successfully used Drupal Console to generate a module.

Now I want to run tests with drupal test:run, but I get this error.

[ERROR] Command "test:run", is not a valid command name.

drupal lists many commands, but it is missing the ones for tests. This is a sample of the list.

 state
  state:delete (std)                      Delete State
  state:override (sto)                    Override a State key.
 taxonomy
  taxonomy:term:delete (ttd)              Delete taxonomy terms from a vocabulary
 theme
  theme:download (thd)                    Download theme in application
  theme:install (thi)                     Install theme or themes in the application
  theme:path (thp)                        Returns the relative path to the theme (or absolute path)
  theme:uninstall (thu)                   Uninstall theme or themes in the application
 update
  update:entities (upe)                   Applying Entity Updates
  update:execute (upex,updb)              Execute a specific Update N function in a module, or execute all
 user
  user:create (uc)                        Create users for the application
  user:delete (ud)                        Delete users from the application

Why are the commands for tests missing?

0

You need to enable Drupal Test module, then run drupal cache:rebuild, and command test:run will appear.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.