mirror of
https://gh.wpcy.net/https://github.com/WordPress/create-block-theme.git
synced 2026-04-27 12:22:16 +08:00
Some checks failed
Run checks / Lint (push) Failing after -8h1m21s
Run checks / Compute previous WordPress version (push) Successful in -8h1m21s
Run checks / PHP 7.4 (WP previous major version) (push) Failing after -8h1m21s
Run checks / PHP 7.4 (push) Failing after -8h1m21s
Run checks / PHP 8.1 (push) Failing after -8h1m21s
Run checks / PHP 8.0 (WP previous major version) (push) Failing after -8h1m21s
Run checks / PHP 8.1 (WP previous major version) (push) Failing after -8h1m21s
Run checks / PHP 8.2 (push) Failing after -8h1m21s
Run checks / PHP 8.2 (WP previous major version) (push) Failing after -8h1m21s
Run checks / PHP 8.3 (push) Failing after -8h1m21s
Run checks / PHP 8.0 (push) Failing after 7s
Run checks / PHP 8.3 (WP previous major version) (push) Failing after 4s
* Use wp-env for PHP unit test * Use test:unit:php:base Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com> --------- Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com>
35 lines
945 B
PHP
35 lines
945 B
PHP
<?php
|
|
/**
|
|
* PHPUnit bootstrap file.
|
|
*
|
|
* @package Create_Block_Theme
|
|
*/
|
|
|
|
$_tests_dir = getenv( 'WP_TESTS_DIR' );
|
|
|
|
if ( ! $_tests_dir ) {
|
|
$_tests_dir = rtrim( sys_get_temp_dir(), '/\\' ) . '/wordpress-tests-lib';
|
|
}
|
|
|
|
define( 'DIR_TESTDATA', __DIR__ . '/data' );
|
|
|
|
// Forward custom PHPUnit Polyfills configuration to PHPUnit bootstrap file.
|
|
$_phpunit_polyfills_path = getenv( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH' );
|
|
if ( false !== $_phpunit_polyfills_path ) {
|
|
define( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH', $_phpunit_polyfills_path );
|
|
}
|
|
|
|
// Give access to tests_add_filter() function.
|
|
require_once "{$_tests_dir}/includes/functions.php";
|
|
|
|
/**
|
|
* Manually load the plugin being tested.
|
|
*/
|
|
function _manually_load_plugin() {
|
|
require dirname( dirname( __FILE__ ) ) . '/create-block-theme.php';
|
|
}
|
|
|
|
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
|
|
|
// Start up the WP testing environment.
|
|
require "{$_tests_dir}/includes/bootstrap.php";
|