By using the environment variable WP_TESTS_DIR in bootstrap.php you can get an error Call to undefined function is_post_type_viewable(). This happens if the WP_TESTS_DIR points to the WordPress testing framework from a newer WP version as the WordPress version used in the tests.
Call to undefined function is_post_type_viewable()
This pull request is a proof of concept where the WP_TESTS_DIR (variable) directory is no longer used. The testing framework from the same version as the installed WordPress version is installed in /tmp/wordpress-tests-lib.
This works for local testing but I have no idea if it will work in different environments.
Use /tmp/wordpress-tests-lib as test framework directory
Use version test framework from current WP install
We can't remove WP_TESTS_DIR without breaking backwards compatibility.
The WP_TESTS_DIR environment variable lets the developer use an already-installed version of the WP test harness, whose directory is set with WP_TESTS_DIR
I understand you cannot remove it for backwards compatibility. The trac ticket assumes you only use the test framework from the installed branch. With VVV and and the current plugin scaffolding I get the undefined function is_post_type_viewable() error because the WP_TESTS_DIR is set in the bash_profile.
undefined function is_post_type_viewable()
For myself, I will use the bootstrap.php and install-wp-tests.sh files from this pull request because I really don't want to add shims of future WordPress functions (used in the test framework) in my plugins.
Use test framework from same branch as WP install