PHP Classes

File: tests/bootstrap.php

Recommend this page to a friend!
  Classes of Josantonius   Eliasis PHP Framework   tests/bootstrap.php   Download  
File: tests/bootstrap.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Eliasis PHP Framework
MVC framework supporting WordPress integration
Author: By
Last change:
Date: 6 years ago
Size: 834 bytes
 

Contents

Class file image Download
<?php
/**
 * Eliasis PHP Framework.
 *
 * @author Josantonius <hello@josantonius.com>
 * @copyright 2017 - 2018 (c) Josantonius - Eliasis Framework
 * @license https://opensource.org/licenses/MIT - The MIT License (MIT)
 * @link https://github.com/Eliasis-Framework/Eliasis
 * @since 1.1.2
 */
session_start();

require
__DIR__ . '/../vendor/autoload.php';

/**
 * Load theme and plugins for testing environment.
 */
function _manually_load_environment()
{
   
switch_theme('twentyseventeen');
   
// require __DIR__ . '/sample-plugin.php';
}

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

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

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

tests_add_filter('muplugins_loaded', '_manually_load_environment');

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