Changeset 46504 for branches/3.8/tests/phpunit/tests/auth.php
- Timestamp:
- 10/14/2019 07:29:52 PM (6 years ago)
- Location:
- branches/3.8
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/auth.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
- Property svn:mergeinfo changed
/trunk merged: 46474-46478,46483,46485
- Property svn:mergeinfo changed
-
branches/3.8/tests/phpunit/tests/auth.php
r30469 r46504 94 94 } 95 95 96 /** 97 * @ticket 29217 98 */ 99 function test_wp_verify_nonce_with_empty_arg() { 100 $this->assertFalse( wp_verify_nonce( '' ) ); 101 $this->assertFalse( wp_verify_nonce( null ) ); 102 } 103 104 /** 105 * @ticket 29542 106 */ 107 function test_wp_verify_nonce_with_integer_arg() { 108 $this->assertFalse( wp_verify_nonce( 1 ) ); 109 } 110 111 /** 112 * @ticket 36361 113 */ 114 public function test_check_admin_referer_with_no_action_triggers_doing_it_wrong() { 115 $this->setExpectedIncorrectUsage( 'check_admin_referer' ); 116 117 // A valid nonce needs to be set so the check doesn't die() 118 $_REQUEST['_wpnonce'] = wp_create_nonce( -1 ); 119 $result = check_admin_referer(); 120 $this->assertSame( 1, $result ); 121 122 unset( $_REQUEST['_wpnonce'] ); 123 } 124 125 /** 126 * @ticket 36361 127 */ 128 public function test_check_ajax_referer_with_no_action_triggers_doing_it_wrong() { 129 $this->setExpectedIncorrectUsage( 'check_ajax_referer' ); 130 131 // A valid nonce needs to be set so the check doesn't die() 132 $_REQUEST['_wpnonce'] = wp_create_nonce( -1 ); 133 $result = check_ajax_referer(); 134 $this->assertSame( 1, $result ); 135 136 unset( $_REQUEST['_wpnonce'] ); 137 } 138 96 139 function test_password_length_limit() { 97 140 $passwords = array(
Note: See TracChangeset
for help on using the changeset viewer.