WordPress.org

Make WordPress Core

Changeset 40240


Ignore:
Timestamp:
03/08/17 00:04:05 (4 months ago)
Author:
johnbillion
Message:

Build/Test tools: Revert [40239] due to unrelated changes.

See #39486

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r40239 r40240  
    901901    do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in' ); 
    902902 
    903     /** 
    904      * Allows preventing auth cookies from actually being sent to the client. 
    905      * 
    906      * @since 4.7.4 
    907      * 
    908      * @param bool $send Whether to send auth cookies to the client. 
    909      */ 
    910     if ( ! apply_filters( 'send_auth_cookies', true ) ) { 
    911         return; 
    912     } 
    913  
    914903    setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); 
    915904    setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); 
     
    933922     */ 
    934923    do_action( 'clear_auth_cookie' ); 
    935  
    936     /** 
    937      * Allows preventing auth cookies from actually being sent to the client. 
    938      * 
    939      * @since 4.7.4 
    940      * 
    941      * @param bool $send Whether to send auth cookies to the client. 
    942      */ 
    943     if ( ! apply_filters( 'send_auth_cookies', true ) ) { 
    944         return; 
    945     } 
    946924 
    947925    setcookie( AUTH_COOKIE,        ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH,   COOKIE_DOMAIN ); 
  • trunk/tests/phpunit/includes/functions.php

    r40239 r40240  
    165165// Skip `setcookie` calls in auth_cookie functions due to warning: 
    166166// Cannot modify header information - headers already sent by ... 
    167 tests_add_filter( 'send_auth_cookies', '__return_false' ); 
     167 
     168function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token = '' ) { 
     169    $auth_cookie = null; 
     170    $expire = null; 
     171    $expiration = null; 
     172    $user_id = null; 
     173    $scheme = null; 
     174    /** This action is documented in wp-inclues/pluggable.php */ 
     175    do_action( 'set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme ); 
     176    $logged_in_cookie = null; 
     177    /** This action is documented in wp-inclues/pluggable.php */ 
     178    do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in' ); 
     179} 
     180 
     181function wp_clear_auth_cookie() { 
     182    /** This action is documented in wp-inclues/pluggable.php */ 
     183    do_action( 'clear_auth_cookie' ); 
     184} 
  • trunk/tests/phpunit/includes/testcase.php

    r40239 r40240  
    175175        $_POST = array(); 
    176176        self::flush_cache(); 
    177     } 
    178  
    179     /** 
    180      * Allow tests to be skipped on some automated runs 
    181      * 
    182      * For test runs on Travis for something other than trunk/master  
    183      * we want to skip tests that only need to run for master. 
    184      */ 
    185     public function skipOnAutomatedBranches() { 
    186         // gentenv can be disabled 
    187         if ( ! function_exists( 'getenv' ) ) { 
    188             return false; 
    189         } 
    190  
    191         // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables 
    192         $travis_branch       = getenv( 'TRAVIS_BRANCH' ); 
    193         $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' ); 
    194  
    195         if ( false !== $travis_pull_request && 'master' !== $travis_branch ) { 
    196             $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 
    197         } 
    198177    } 
    199178 
  • trunk/tests/phpunit/tests/basic.php

    r40239 r40240  
    99 
    1010    function test_license() { 
    11         // This test is designed to only run on trunk/master 
    12         $this->skipOnAutomatedBranches(); 
    13  
    1411        $license = file_get_contents( ABSPATH . 'license.txt' ); 
    1512        preg_match( '#Copyright 2011-(\d+) by the contributors#', $license, $matches ); 
  • trunk/tests/phpunit/tests/external-http/basic.php

    r40239 r40240  
    66 
    77    function test_readme() { 
    8         // This test is designed to only run on trunk/master 
    9         $this->skipOnAutomatedBranches(); 
    10  
    118        $readme = file_get_contents( ABSPATH . 'readme.html' ); 
    129 
Note: See TracChangeset for help on using the changeset viewer.