Changeset 46499 for branches/4.3/tests/phpunit/tests/auth.php
- Timestamp:
- 10/14/2019 07:11:50 PM (7 years ago)
- Location:
- branches/4.3
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/auth.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3
- Property svn:mergeinfo changed
/trunk merged: 46474-46478,46483,46485
- Property svn:mergeinfo changed
-
branches/4.3/tests/phpunit/tests/auth.php
r33019 r46499 111 111 } 112 112 113 /** 114 * @ticket 36361 115 */ 116 public function test_check_admin_referer_with_no_action_triggers_doing_it_wrong() { 117 $this->setExpectedIncorrectUsage( 'check_admin_referer' ); 118 119 // A valid nonce needs to be set so the check doesn't die() 120 $_REQUEST['_wpnonce'] = wp_create_nonce( -1 ); 121 $result = check_admin_referer(); 122 $this->assertSame( 1, $result ); 123 124 unset( $_REQUEST['_wpnonce'] ); 125 } 126 127 /** 128 * @ticket 36361 129 */ 130 public function test_check_ajax_referer_with_no_action_triggers_doing_it_wrong() { 131 $this->setExpectedIncorrectUsage( 'check_ajax_referer' ); 132 133 // A valid nonce needs to be set so the check doesn't die() 134 $_REQUEST['_wpnonce'] = wp_create_nonce( -1 ); 135 $result = check_ajax_referer(); 136 $this->assertSame( 1, $result ); 137 138 unset( $_REQUEST['_wpnonce'] ); 139 } 140 113 141 function test_password_length_limit() { 114 142 $passwords = array(
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)