- Timestamp:
- 09/24/2024 04:38:36 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/application-passwords.php
r55457 r59084 78 78 'args' => array( 'name' => '<script>console.log("Hello")</script>' ), 79 79 ), 80 'application_password_duplicate_name when name exists' => array(81 'expected' => array(82 'error_code' => 'application_password_duplicate_name',83 'error_message' => 'Each application name should be unique.',84 ),85 'args' => array( 'name' => 'test2' ),86 'names' => array( 'test1', 'test2' ),87 ),88 80 ); 89 81 } … … 197 189 ); 198 190 } 191 192 /** 193 * @ticket 51941 194 */ 195 public function test_can_create_duplicate_app_password_names() { 196 $created = WP_Application_Passwords::create_new_application_password( self::$user_id, array( 'name' => 'My App' ) ); 197 $this->assertNotWPError( $created, 'First attempt to create an application password should not return an error' ); 198 $created = WP_Application_Passwords::create_new_application_password( self::$user_id, array( 'name' => 'My App' ) ); 199 $this->assertNotWPError( $created, 'Second attempt to create an application password should not return an error' ); 200 } 199 201 }
Note: See TracChangeset
for help on using the changeset viewer.