Changeset 38420 for trunk/tests/phpunit/tests/auth.php
- Timestamp:
- 08/28/2016 05:14:52 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/auth.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/auth.php
r38398 r38420 150 150 } 151 151 152 /** 153 * @ticket 36361 154 */ 155 public function test_check_admin_referer_with_no_action_triggers_doing_it_wrong() { 156 $this->setExpectedIncorrectUsage( 'check_admin_referer' ); 157 158 // A valid nonce needs to be set so the check doesn't die() 159 $_REQUEST['_wpnonce'] = wp_create_nonce( -1 ); 160 $result = check_admin_referer(); 161 $this->assertSame( 1, $result ); 162 163 unset( $_REQUEST['_wpnonce'] ); 164 } 165 166 /** 167 * @ticket 36361 168 */ 169 public function test_check_ajax_referer_with_no_action_triggers_doing_it_wrong() { 170 $this->setExpectedIncorrectUsage( 'check_ajax_referer' ); 171 172 // A valid nonce needs to be set so the check doesn't die() 173 $_REQUEST['_wpnonce'] = wp_create_nonce( -1 ); 174 $result = check_ajax_referer(); 175 $this->assertSame( 1, $result ); 176 177 unset( $_REQUEST['_wpnonce'] ); 178 } 179 152 180 function test_password_length_limit() { 153 181 $limit = str_repeat( 'a', 4096 );
Note: See TracChangeset
for help on using the changeset viewer.