configuração de pasta de testes fora do git

This commit is contained in:
Leo Germani 2017-11-10 19:08:12 -02:00
parent 0230de0935
commit d9694f7abb
3 changed files with 11 additions and 2 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -0,0 +1,7 @@
<?php
return [
'tests_dir' => '/tmp/wordpress-tests-lib'
];
?>

View File

@ -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';