Skip to:
Content

bbPress.org

Ticket #3326: 3326.patch

File 3326.patch, 3.7 KB (added by fayazgabol, 22 months ago)

Patch

  • tests/phpunit/includes/define-constants.php

     
    11<?php
    22
    3 // Define constants used by bbPress test suite
     3// Define constants used by bbPress test suite.
    44if ( ! defined( 'BBP_PLUGIN_DIR' ) ) {
    55        define( 'BBP_PLUGIN_DIR', dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/src/' );
    66}
     
    2424        define( 'WP_ROOT_DIR', WP_TESTS_DIR );
    2525} else {
    2626
    27         // Support WP_DEVELOP_DIR, as used by some plugins
     27        // Support WP_DEVELOP_DIR, as used by some plugins.
    2828        if ( false !== getenv( 'WP_DEVELOP_DIR' ) ) {
    2929                define( 'WP_ROOT_DIR', getenv( 'WP_DEVELOP_DIR' ) );
    3030        } else {
     
    3939if ( file_exists( WP_ROOT_DIR . '/wp-tests-config.php' ) ) {
    4040        define( 'WP_TESTS_CONFIG_PATH', WP_ROOT_DIR . '/wp-tests-config.php' );
    4141
    42 // Legacy unit-test.svn.wordpress.org setup
     42// Legacy unit-test.svn.wordpress.org setup.
    4343} elseif ( file_exists( WP_TESTS_DIR . '/wp-tests-config.php' ) ) {
    4444        define( 'WP_TESTS_CONFIG_PATH', WP_TESTS_DIR . '/wp-tests-config.php' );
    4545
  • tests/phpunit/includes/install.php

     
    2828}
    2929tests_add_filter( 'plugins_loaded', '_load_bbpress' );
    3030
    31 // Override some fussy global values
     31// Override some fussy global values.
    3232$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
    3333$_SERVER['HTTP_HOST']       = WP_TESTS_DOMAIN;
    3434$_SERVER['REMOTE_ADDR']     = '127.0.0.1';
    3535
    36 // Fix PHP identity crisis
     36// Fix PHP identity crisis.
    3737$PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php';
    3838
    39 // Include WordPress
     39// Include WordPress.
    4040echo "Loading WordPress via `wp-settings.php`...\n";
    4141require_once ABSPATH . '/wp-settings.php';
    4242
    43 // Fix fussy database settings
     43// Fix fussy database settings.
    4444$wpdb->query( 'SET storage_engine = INNODB' );
    4545$wpdb->select( DB_NAME, $wpdb->dbh );
    4646
    47 // Install bbPress
     47// Install bbPress.
    4848echo "Installing bbPress...\n";
    4949bbp_version_bump();
  • tests/phpunit/includes/loader.php

     
    11<?php
    22
    3 // Setup multisite global constant
     3// Setup multisite global constant.
    44$multisite = (int) ( defined( 'WP_TESTS_MULTISITE') && WP_TESTS_MULTISITE );
    55
    66echo "Determining installation type...\n";
  • tests/phpunit/includes/speed-trap-listener.php

     
    163163        $this->suites--;
    164164
    165165        if (0 === $this->suites && $this->hasSlowTests()) {
    166             arsort($this->slow); // Sort longest running tests to the top
     166            arsort($this->slow); // Sort longest running tests to the top.
    167167
    168168            $this->renderHeader();
    169169            $this->renderBody();
  • tests/phpunit/includes/testcase.php

     
    110110
    111111                $_SERVER['SERVER_NAME'] = 'example.com';
    112112
    113                 // passthrough
     113                // pass through.
    114114                return $args;
    115115        }
    116116
     
    125125                        unset( $_SERVER['SERVER_NAME'] );
    126126                }
    127127
    128                 // passthrough
     128                // pass through.
    129129                return $args;
    130130        }
    131131