Some checks failed
Tests / PHP 7.0 (push) Has been cancelled
Tests / PHP 7.4 (push) Has been cancelled
Tests / PHP 8.0 (push) Has been cancelled
Tests / Code Style (push) Has been cancelled
Sync Wiki / Sync Wiki to GitHub (push) Has been cancelled
Release / Build and Release (push) Has been cancelled
28 lines
863 B
PHP
28 lines
863 B
PHP
<?php
|
|
/**
|
|
* PHPUnit bootstrap file
|
|
*
|
|
* @package WPALLSTARS\PluginStarterTemplate
|
|
*/
|
|
|
|
// First, we need to load the composer autoloader so we can use WP Mock.
|
|
require_once dirname(__DIR__) . '/vendor/autoload.php';
|
|
|
|
// Now call the bootstrap method of WP Mock.
|
|
WP_Mock::bootstrap();
|
|
|
|
/**
|
|
* Now we define a few constants to help us with testing.
|
|
*/
|
|
define('WPST_PLUGIN_DIR', dirname(__DIR__) . '/');
|
|
define('WPST_PLUGIN_URL', 'http://example.org/wp-content/plugins/wp-plugin-starter-template/');
|
|
define('WPST_VERSION', '0.1.0');
|
|
|
|
/**
|
|
* Now we include any plugin files that we need to be able to run the tests.
|
|
* This should be files that define the functions and classes you're going to test.
|
|
*/
|
|
require_once WPST_PLUGIN_DIR . 'includes/core.php';
|
|
require_once WPST_PLUGIN_DIR . 'includes/plugin.php';
|
|
require_once WPST_PLUGIN_DIR . 'admin/lib/admin.php';
|