File: tests/bootstrap.php

Recommend this page to a friend!
  Classes of Josantonius  >  WP_Menu  >  tests/bootstrap.php  >  Download  
File: tests/bootstrap.php
Role: Example script
Content type: text/plain
Description: Example script
Class: WP_Menu
Add menu or submenu page in WordPress
Author: By
Last change:
Date: 2 years ago
Size: 802 bytes
 

Contents

Class file image Download
<?php
/**
 * Add menu or submenus in WordPress.
 *
 * @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_Menu
 * @since 1.0.4
 */

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

$loader->add('Josantonius\WP_Menu\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';



For more information send a message to info at phpclasses dot org.