PHP Classes

File: tests/bootstrap.php

Recommend this page to a friend!
  Classes of Josantonius   WP_Register   tests/bootstrap.php   Download  
File: tests/bootstrap.php
Role: Example script
Content type: text/plain
Description: Example script
Class: WP_Register
Minify and unify CSS and JavaScript for WordPress
Author: By
Last change: Updated to 1.0.4 version
Updated to 1.0.4 version
Date: 6 years ago
Size: 832 bytes
 

Contents

Class file image Download
<?php
/**
 * Register, minify and unify CSS and JavaScript resources.
 *
 * @author Josantonius - hello@josantonius.com
 * @copyright Copyright (c) 2017
 * @license https://opensource.org/licenses/MIT - The MIT License (MIT)
 * @link https://github.com/Josantonius/WP_Register
 * @since 1.0.4
 */

$loader = require __DIR__ . '/../src/bootstrap.php';

$loader->add('Josantonius\WP_Register\Test', __DIR__);

define('WP_CORE_DIR', '/tmp/wordpress/');

define('WP_TESTS_DIR', '/tmp/wordpress-tests-lib');

require_once
WP_TESTS_DIR . '/includes/functions.php';

function
_manually_load_environment() {

   
switch_theme('twentyseventeen');

    require
__DIR__ . '/sample-plugin.php';
}

tests_add_filter('muplugins_loaded', '_manually_load_environment');

require_once
WP_TESTS_DIR . '/includes/bootstrap.php';