Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure PHPStorm to run Drupal PHPUnit functional tests (linux host) #59

Closed
mortona42 opened this issue Apr 24, 2023 · 3 comments
Closed

Comments

@mortona42
Copy link

I want to be able to run Drupal tests within PHPStorm, but have not been able to configure it correctly. Unit and Kernel tests will run, but Functional tests are running into issues like file permissions or accessing urls.

I configured a CLI interpreter to use docker compose and included all configuration files in ~/.lando/compose/SITE, selecting appserver as the service.

When run is selected, it's giving file permission errors:

Exception : User warning: mkdir(): Permission Denied
Drupal\Component\PhpStorage\FileStorage->createDirectory()() (Line: 123)

When exec is selected:
the input device is not a TTY

If I create a CLI interpreter using the docker image, I get:
Behat\Mink\Exception\ElementNotFoundException : Button with id|name|label|value "Log in" not found.
This seems like it's not getting the right page at the configured url, http://appserver

Is there another way to get PHPUnit working in PHPStorm?

@mortona42 mortona42 added the php label Apr 24, 2023
@pirog pirog transferred this issue from lando/lando Apr 24, 2023
@pirog pirog added Needs Triage and removed php labels Apr 24, 2023
@gitressa
Copy link
Contributor

gitressa commented Apr 24, 2023

You could give Lando + Drupal Contributions a try?

This repo is intended to make it easy to contribute to the Drupal core and contrib projects.

Setting up, testing, and writing Drupal patches can be a confusing gauntlet to the uninitiated, this project automates as much of the process as possible.

The repo has several waiting merge requests, hopefully they can soon get committed. Until then, collecting some info from this issue might get it running for you? thinktandem/drupal-contributions#76

@mortona42
Copy link
Author

I'm not running the javascript tests yet so not blocked by the chromedriver setup atm. What I'm looking for is instructions to configure PHPstorm to work with lando. My lando setup is similar to drupal contributions.

This is actually a duplicate of #6, so I'm going to close it and move my post over there.

@gitressa
Copy link
Contributor

Thanks for clearing that that up, and great that you got it working in the other issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants