mirror of
https://ghproxy.net/https://github.com/fairpm/fair-plugin.git
synced 2025-09-06 01:48:29 +08:00
Add initial PHPUnit test infrastructure. (#60)
Signed-off-by: costdev <79332690+costdev@users.noreply.github.com>
This commit is contained in:
parent
1469385277
commit
c8b8af77de
14 changed files with 745 additions and 3 deletions
43
wp-tests-config-sample.php
Normal file
43
wp-tests-config-sample.php
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
/* Path to the WordPress Core codebase. */
|
||||
if ( file_exists( dirname( __DIR__, 2 ) . '/wp-load.php' ) ) {
|
||||
define( 'ABSPATH', dirname( __DIR__, 2 ) . '/');
|
||||
} elseif ( file_exists( dirname( __DIR__, 3 ) . '/wp-load.php' ) ) {
|
||||
define( 'ABSPATH', dirname( __DIR__, 3 ) . '/');
|
||||
}
|
||||
|
||||
// Test with multisite enabled: (previously -m)
|
||||
// define( 'WP_TESTS_MULTISITE', true );
|
||||
|
||||
// Force known bugs: (previously -f)
|
||||
// define( 'WP_TESTS_FORCE_KNOWN_BUGS', true );
|
||||
|
||||
// Test with WordPress debug mode on (previously -d)
|
||||
// define( 'WP_DEBUG', true );
|
||||
|
||||
// ** MySQL settings ** //
|
||||
|
||||
// This configuration file will be used by the copy of WordPress being tested.
|
||||
// wordpress/wp-config.php will be ignored.
|
||||
|
||||
// WARNING WARNING WARNING!
|
||||
// These tests will DROP ALL TABLES in the database with the prefix named below.
|
||||
// DO NOT use a production database or one that is shared with something else.
|
||||
|
||||
define( 'DB_NAME', 'tests-wordpress' );
|
||||
define( 'DB_USER', 'root' );
|
||||
define( 'DB_PASSWORD', 'password' );
|
||||
define( 'DB_HOST', 'tests-mysql' );
|
||||
define( 'DB_CHARSET', 'utf8' );
|
||||
define( 'DB_COLLATE', '' );
|
||||
|
||||
$table_prefix = 'wptests_'; // Only numbers, letters, and underscores please!
|
||||
|
||||
define( 'WP_TESTS_DOMAIN', 'example.org' );
|
||||
define( 'WP_TESTS_EMAIL', 'admin@example.org' );
|
||||
define( 'WP_TESTS_TITLE', 'Test Blog' );
|
||||
|
||||
define( 'WP_PHP_BINARY', 'php' );
|
||||
|
||||
define( 'WPLANG', '' );
|
Loading…
Add table
Add a link
Reference in a new issue