When using WP-CLI's scaffold command to set up WP integration tests, the install-wp-tests.sh bash script sets WP_TESTS_DIR to /tmp/wordpress-tests-lib.
get_path_to_wp_test_dir() does not currently check for that location, but instead requires setting the WP_TESTS_DIR environment variable manually.
I hereby propose adding such a check as a fallback in get_path_to_wp_test_dir().
Something like this:
$tests_dir = \realpath( sys_get_temp_dir() . '/wordpress-tests-lib' );
if ( $tests_dir !== false ) {
return $normalize_path( $tests_dir ) . '/';
}