Closed dnaber-de closed 7 years ago
Yes, and here comes the concrete issue:
Warning: require_once(/tmp/wordpress-tests-lib/includes/functions.php):
How does the actual setup has to look like? Isn't the WP_TESTS_DIR
the WP dev repository git://develop.git.wordpress.org/
which looks like this?
I'll take a look when I get a chance @dnaber-de
closing this out
I'm currently dealing with a PR for #2 and want to write tests. But the current setup has two issues:
The configuration file is named
phpunit.xml
which is typically the name for the local copy of the distributed version of this file. If we could rename this file tophpunit.xml.dist
and addphpunit.xml
to the projects.gitignore
, one would be able to have a local copy to adapt the test setup to the local environment. PHPUnit is aware of that and looks up forphpunit.xml
first and falls back tophpunit.xml.dist
if the first one is not available. Also PHPStorm supports the.dist
file.The other one is the idea of specifying the WordPress test directory via an environment variable or set it to a static directory. Typically one is managing many projects on a system and might want to test things with different WordPress versions. However, maybe you want to have a look at
wp-tests-starter
. This package allows you to bootstrap WordPress system tests on a per-project base. Database credentials are then typically stored inphpunit.xml
locally. As everything (also the WordPress dev repository) is managed with composer, every contributor would have the exact same development and testing setup.