Changeset 40240
- Timestamp:
- 03/08/2017 12:04:05 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r40239 r40240 901 901 do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in' ); 902 902 903 /**904 * Allows preventing auth cookies from actually being sent to the client.905 *906 * @since 4.7.4907 *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 914 903 setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); 915 904 setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); … … 933 922 */ 934 923 do_action( 'clear_auth_cookie' ); 935 936 /**937 * Allows preventing auth cookies from actually being sent to the client.938 *939 * @since 4.7.4940 *941 * @param bool $send Whether to send auth cookies to the client.942 */943 if ( ! apply_filters( 'send_auth_cookies', true ) ) {944 return;945 }946 924 947 925 setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN ); -
trunk/tests/phpunit/includes/functions.php
r40239 r40240 165 165 // Skip `setcookie` calls in auth_cookie functions due to warning: 166 166 // Cannot modify header information - headers already sent by ... 167 tests_add_filter( 'send_auth_cookies', '__return_false' ); 167 168 function 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 181 function 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 175 175 $_POST = array(); 176 176 self::flush_cache(); 177 }178 179 /**180 * Allow tests to be skipped on some automated runs181 *182 * For test runs on Travis for something other than trunk/master183 * we want to skip tests that only need to run for master.184 */185 public function skipOnAutomatedBranches() {186 // gentenv can be disabled187 if ( ! function_exists( 'getenv' ) ) {188 return false;189 }190 191 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables192 $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 }198 177 } 199 178 -
trunk/tests/phpunit/tests/basic.php
r40239 r40240 9 9 10 10 function test_license() { 11 // This test is designed to only run on trunk/master12 $this->skipOnAutomatedBranches();13 14 11 $license = file_get_contents( ABSPATH . 'license.txt' ); 15 12 preg_match( '#Copyright 2011-(\d+) by the contributors#', $license, $matches ); -
trunk/tests/phpunit/tests/external-http/basic.php
r40239 r40240 6 6 7 7 function test_readme() { 8 // This test is designed to only run on trunk/master9 $this->skipOnAutomatedBranches();10 11 8 $readme = file_get_contents( ABSPATH . 'readme.html' ); 12 9
Note: See TracChangeset
for help on using the changeset viewer.