-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwp-tests-config.php.example
More file actions
68 lines (56 loc) · 1.88 KB
/
Copy pathwp-tests-config.php.example
File metadata and controls
68 lines (56 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
* WordPress test configuration example for FE CSV Import & Export
*
* Copy this file to wp-tests-config.php and adjust the environment as needed.
*
* @package FE_CSV_Import_Export\Tests
*/
$fe_csv_import_export_mysql_socket = getenv( 'MYSQL_UNIX_PORT' );
if ( $fe_csv_import_export_mysql_socket ) {
ini_set( 'mysqli.default_socket', $fe_csv_import_export_mysql_socket );
ini_set( 'pdo_mysql.default_socket', $fe_csv_import_export_mysql_socket );
}
if ( ! defined( 'ABSPATH' ) ) {
$fe_csv_import_export_wp_dir = false;
$fe_csv_import_export_possible_paths = [
'../../wp',
'../../../wp',
dirname( __DIR__, 2 ) . '/wp',
dirname( __DIR__, 3 ),
];
foreach ( $fe_csv_import_export_possible_paths as $fe_csv_import_export_candidate_path ) {
if ( file_exists( $fe_csv_import_export_candidate_path . '/wp-load.php' ) ) {
$fe_csv_import_export_wp_dir = $fe_csv_import_export_candidate_path;
break;
}
}
if ( $fe_csv_import_export_wp_dir ) {
define( 'ABSPATH', rtrim( $fe_csv_import_export_wp_dir, '/\\' ) . '/' );
}
}
define( 'DB_NAME', getenv( 'DB_NAME' ) ? getenv( 'DB_NAME' ) : 'local' );
define( 'DB_USER', getenv( 'DB_USER' ) ? getenv( 'DB_USER' ) : 'root' );
define( 'DB_PASSWORD', getenv( 'DB_PASSWORD' ) ? getenv( 'DB_PASSWORD' ) : 'root' );
define(
'DB_HOST',
getenv( 'DB_HOST' ) ? getenv( 'DB_HOST' ) : 'localhost'
);
define( 'DB_CHARSET', 'utf8' );
define( 'DB_COLLATE', '' );
if ( ! defined( 'WP_TESTS_DOMAIN' ) ) {
define( 'WP_TESTS_DOMAIN', 'example.org' );
}
if ( ! defined( 'WP_TESTS_EMAIL' ) ) {
define( 'WP_TESTS_EMAIL', 'admin@example.org' );
}
if ( ! defined( 'WP_TESTS_TITLE' ) ) {
define( 'WP_TESTS_TITLE', 'FE CSV Import & Export Test Site' );
}
if ( ! defined( 'WP_PHP_BINARY' ) ) {
define( 'WP_PHP_BINARY', 'php' );
}
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', false );
$table_prefix = 'wptests_';