![]() Configure the PHPUnit tests to run over SSH on your Vagrant.Add a remote PHP interpreter to your PHPStorm Configuration.Configure PHPStorm to know where your Vagrant following this configuration.If you run your Drupal installation in a Virtual Machine (Vagrant) your configuration has to be a little different, just replace the first steps for these (This functionality is PHPStorm v.8 exclusively): , or press ctrl + R on Mac OS, or shift + F10 on Linux. Run the test suite by going to Run > Run.In the Test runner section: for the Test scope option, select Defined in the configuration file, tick the Use alternative configuration file checkbox, and enter the path to your Drupal root directory, followed by /core/phpunit.xml.Click the plus sign in the top left corner of the screen and select PHPUnit.This allows you to debug directly out of the file, without setting up a custom configuration. You can also set the Default configuration file directly to your Drupal root directory, followed by /core/phpunit.xml. For Path to script, enter the path to your Drupal root directory, followed by /vendor/autoload.php. ![]() (Earlier versions of PhpStorm call this option: Use custom autoloader or Use custom autoloader). (Earlier versions of PHPStorm place this configuration at: PhpStorm v8-9.x: Project settings > PHP > PHPUnit, PhpStorm v10.x Languages & Frameworks > PHP > PHPUnit) ![]() Click " +" button, select "PHPUnit local" from dropdown. Create a Test Framework configuration by navigating to Languages & Frameworks > PHP > Test Frameworks.On Linux or Windows, press ctrl + alt + s or go to File > Settings. Open to PhpStorm's settings/preferences.(Without this step all tests that require a database will be ignored.) Edit /core/phpunit.xml and add the site's database credentials in the SIMPLETEST_DB variable.Duplicate the /core/ file and rename the copy to /core/phpunit.xml.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |