Functional testsĪgain this needs to be accessible to the php interpreter. If you check the debug tab of the subprocess you’ll see “Cannot find a local copy of the file on server /var/This is why we uncheck “Force break at first line when no path mapping specified”. When you debug the test you will see the debugger pauses with two tabs, one for the Kernel test and one for “Standard input code”, which is the subprocess. We also need to ensure the PHP_IDE_CONFIG env var is actually set in the subprocess. To intercept the subprocess we need to make sure we’re listening for connections first. See KernelTestBase::runTestInSeparateProcess. Kernel tests run in a separate PHP process which means PHPStorm has a harder time dealing with them. In ddev you can use mysql://db: /db which is the internal connection string for the database, or for better performance use sqlite://localhost/sites/simpletest/db.sqlite We need to make sure the database configured in SIMPLETEST_DB is accessible to the remote PHP interpreter. Just make sure you have xdebug enabled ( ddev xdebug on). These should essentially “just work” as they run in a single process with no database, you don’t even need to be listening for connections. It's best to refer to the video above for these, but some brief info below. chrome:$DDEV_HOSTNAME Running and debugging tests Will be fixed in ddev soon.Ĭontainer_name: ddev-$ # DDev already sets this, add it here to debug Kernel tests. Add the following files then run ddev restart to regenerate the full docker-compose file. Fortunately we can extend the generated docker-compose file by adding extra files in the. There are a few extra parts we need for running every kind of test. For now you can revert ddev's docker-compose version with the following command:ĭdev config global -required-docker-compose-version=v1.29.2įor the most part DDev configures everything we need to use xdebug in PHPStorm. This defaults to v2 which still has some compatibility issues with PHPStorm. UPDATE JANUARY 2022 - Since v1.18.2 ddev now ships its own docker-compose version.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |