Files
ultimatemember/tests/bootstrap.php
T
Yurii Nalivaiko 797bc2fd98 Squashed 'includes/lib/action-scheduler/' content from commit c82834771
git-subtree-dir: includes/lib/action-scheduler
git-subtree-split: c828347715e6c3318c8ab8b4fea2d87b31d51aac
2024-09-03 12:28:53 +02:00

37 lines
1.6 KiB
PHP

<?php
$GLOBALS['wp_tests_options'][ 'template' ] = 'twentyseventeen';
$GLOBALS['wp_tests_options'][ 'stylesheet' ] = 'twentyseventeen';
$GLOBALS['wp_tests_options'][ 'active_plugins' ][] = basename( dirname( __DIR__ ) ) .'/action-scheduler.php';
// Check for select constants defined as environment variables
foreach ( array('WP_CONTENT_DIR', 'WP_CONTENT_URL', 'WP_PLUGIN_DIR', 'WP_PLUGIN_URL', 'WPMU_PLUGIN_DIR') as $env_constant ) {
if ( false !== getenv( $env_constant ) && !defined( $env_constant ) ) {
define( $env_constant, getenv( $env_constant ));
}
}
if ( ! defined( 'WP_PLUGIN_DIR' ) ) {
define( 'WP_PLUGIN_DIR', dirname( dirname( dirname( __FILE__ ) ) ) );
}
// PHPUnit polyfills as required by the core WP test framework.
require_once __DIR__ . '/../vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php';
$wordpress_tests_dir = getenv( 'WP_TESTS_DIR' ) ? getenv( 'WP_TESTS_DIR' ) : sys_get_temp_dir() . '/wordpress-tests-lib';
require_once $wordpress_tests_dir . '/includes/functions.php';
require $wordpress_tests_dir . '/includes/bootstrap.php';
require_once dirname(dirname( __FILE__ ) ) .'/action-scheduler.php';
if ( class_exists( 'PHPUnit\Framework\TestResult' ) ) { // PHPUnit 6.0 or newer
include_once('ActionScheduler_UnitTestCase.php');
} else {
include_once('phpunit/deprecated/ActionScheduler_UnitTestCase.php');
}
include_once 'phpunit/helpers/ActionScheduler_Callbacks.php';
include_once('phpunit/ActionScheduler_Mocker.php');
include_once('phpunit/ActionScheduler_Mock_Async_Request_QueueRunner.php');
include_once('phpunit/jobstore/AbstractStoreTest.php');