Changeset 33744 for trunk/tests/phpunit/tests/auth.php
- Timestamp:
- 08/26/2015 12:05:11 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/auth.php
r33019 r33744 9 9 var $wp_hasher; 10 10 11 /** 12 * action hook 13 */ 14 protected $nonce_failure_hook = 'wp_verify_nonce_failed'; 15 11 16 function setUp() { 12 17 parent::setUp(); … … 111 116 } 112 117 118 /** 119 * @ticket 24030 120 */ 121 function test_wp_nonce_verify_failed() { 122 $nonce = substr( md5( uniqid() ), 0, 10 ); 123 $count = did_action( $this->nonce_failure_hook ); 124 125 wp_verify_nonce( $nonce, 'nonce_test_action' ); 126 127 $this->assertEquals( ( $count + 1 ), did_action( $this->nonce_failure_hook ) ); 128 } 129 130 /** 131 * @ticket 24030 132 */ 133 function test_wp_nonce_verify_success() { 134 $nonce = wp_create_nonce( 'nonce_test_action' ); 135 $count = did_action( $this->nonce_failure_hook ); 136 137 wp_verify_nonce( $nonce, 'nonce_test_action' ); 138 139 $this->assertEquals( $count, did_action( $this->nonce_failure_hook ) ); 140 } 141 113 142 function test_password_length_limit() { 114 143 $passwords = array(
Note: See TracChangeset
for help on using the changeset viewer.