Changeset 53701 for trunk/tests/phpunit/tests/ajax/Attachments.php
- Timestamp:
- 07/14/2022 02:26:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ajax/Attachments.php
r53561 r53701 19 19 public function test_wp_ajax_send_attachment_to_editor_should_return_an_image() { 20 20 // Become an administrator. 21 $post = $_POST; 22 $user_id = self::factory()->user->create( 23 array( 24 'role' => 'administrator', 25 'user_login' => 'user_36578_administrator', 26 'user_email' => 'user_36578_administrator@example.com', 27 ) 28 ); 29 wp_set_current_user( $user_id ); 30 $_POST = array_merge( $_POST, $post ); 21 $this->_setRole( 'administrator' ); 31 22 32 23 $filename = DIR_TESTDATA . '/images/canola.jpg'; … … 75 66 76 67 // Become an administrator. 77 $post = $_POST; 78 $user_id = self::factory()->user->create( 79 array( 80 'role' => 'administrator', 81 'user_login' => 'user_36578_administrator', 82 'user_email' => 'user_36578_administrator@example.com', 83 ) 84 ); 85 wp_set_current_user( $user_id ); 86 $_POST = array_merge( $_POST, $post ); 68 $this->_setRole( 'administrator' ); 87 69 88 70 $filename = DIR_TESTDATA . '/formatting/entities.txt';
Note: See TracChangeset
for help on using the changeset viewer.