Skip to content
Snippets Groups Projects
Select Git revision
  • fb874718892903f3ac6c0af5d5fe32371390e3e1
  • master default protected
  • bugfix/wordpress-review
  • fix/duplicate
  • bugfix/get_current_screen_fail
  • feature/dismiss-nonce
  • replace-dodgy-path
  • bugfix/notice-not-show
  • devel
  • 3.3.0
  • 3.2.5
  • 3.2.4
  • 3.2.3
  • 3.2.2
  • 3.2.1
  • 3.2.0
  • 3.2.0-beta7
  • 3.2.0-beta6
  • 3.2.0-beta5
  • 3.2.0-beta4
  • 3.2.0-beta3
  • 3.2.0-beta2
  • 3.2.0-beta1
  • 3.1.4
  • 3.1.4-beta1
  • 3.1.3
  • 3.1.1
  • 3.1
  • 3.0
29 results

bootstrap.php

Blame
  • bootstrap.php 977 B
    <?php
    
    ini_set('error_reporting', E_ALL); // or error_reporting(E_ALL);
    ini_set('display_errors', '1');
    ini_set('display_startup_errors', '1');
    
    // disable xdebug backtrace
    if ( function_exists( 'xdebug_disable' ) ) {
    	xdebug_disable();
    }
    
    require_once __DIR__ . '/../../vendor/autoload.php';
    
    if ( getenv( 'PLUGIN_PATH' ) !== false ) {
    	define( 'PLUGIN_PATH', getenv( 'PLUGIN_PATH' ) );
    } else {
    	define( 'PLUGIN_PATH', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR );
    }
    
    require_once( getenv( 'WP_DEVELOP_DIR' ) . '/tests/phpunit/includes/functions.php' );
    
    tests_add_filter( 'muplugins_loaded', function () {
    	$plugins_to_active[] = 'hello.php';
    	update_option( 'active_plugins', $plugins_to_active );
    }, 100 );
    
    //new \WPDesk\Notice\AjaxHandler( 'http://test.com/test/vendor/' );
    
    putenv('WP_TESTS_DIR=' . getenv( 'WP_DEVELOP_DIR' ) . '/tests/phpunit');
    require_once( getenv( 'WC_DEVELOP_DIR' ) . '/legacy/tests/bootstrap.php' );