From d9694f7abb00f2d2b5215cf1bdafdb4beec903a0 Mon Sep 17 00:00:00 2001 From: Leo Germani Date: Fri, 10 Nov 2017 19:08:12 -0200 Subject: [PATCH] =?UTF-8?q?configura=C3=A7=C3=A3o=20de=20pasta=20de=20test?= =?UTF-8?q?es=20fora=20do=20git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- tests/bootstrap-config-sample.php | 7 +++++++ tests/bootstrap.php | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 tests/bootstrap-config-sample.php diff --git a/.gitignore b/.gitignore index 321962ab6..6b04b15ec 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ build-config.cfg src/style.css src/style.css.map src/scss/.sass-cache -tests/bootstrap.php +tests/bootstrap-config.php .idea \ No newline at end of file diff --git a/tests/bootstrap-config-sample.php b/tests/bootstrap-config-sample.php new file mode 100644 index 000000000..6fd10dd3d --- /dev/null +++ b/tests/bootstrap-config-sample.php @@ -0,0 +1,7 @@ + '/tmp/wordpress-tests-lib' +]; + + ?> \ No newline at end of file diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 01a830ec8..bb2411106 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,9 +4,11 @@ * * @package Test_Tainacan */ +$bootstrap_cfg = require('bootstrap-config.php'); + $_tests_dir = getenv( 'WP_TESTS_DIR' ); if ( ! $_tests_dir ) { - $_tests_dir = '/tmp/wordpress-tests-lib'; + $_tests_dir = $bootstrap_cfg['tests_dir']; } // Give access to tests_add_filter() function. require_once $_tests_dir . '/includes/functions.php';