Changeset 46503 for branches/3.9/tests/phpunit/tests/auth.php
- Timestamp:
- 10/14/2019 07:26:08 PM (7 years ago)
- File:
-
- 1 edited
-
branches/3.9/tests/phpunit/tests/auth.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9/tests/phpunit/tests/auth.php
r30468 r46503 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)