Changeset 47122 for trunk/tests/phpunit/tests/user/slashes.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/slashes.php
r46586 r47122 13 13 wp_set_current_user( $this->author_id ); 14 14 15 // it is important to test with both even and odd numbered slashes as16 // kses does a strip-then-add slashes in some of its function calls15 // It is important to test with both even and odd numbered slashes, 16 // as KSES does a strip-then-add slashes in some of its function calls. 17 17 $this->slash_1 = 'String with 1 slash \\'; 18 18 $this->slash_2 = 'String with 2 slashes \\\\'; … … 25 25 26 26 /** 27 * Tests the controller function that expects slashed data 27 * Tests the controller function that expects slashed data. 28 28 */ 29 29 function test_add_user() { … … 41 41 $_POST['display_name'] = $this->slash_7; 42 42 $_POST['description'] = $this->slash_3; 43 $_POST = add_magic_quotes( $_POST ); // the edit_post() function will strip slashes 43 44 $_POST = add_magic_quotes( $_POST ); // The add_user() function will strip slashes. 44 45 45 46 $id = add_user(); … … 65 66 $_POST['display_name'] = $this->slash_2; 66 67 $_POST['description'] = $this->slash_4; 67 $_POST = add_magic_quotes( $_POST ); // the edit_post() function will strip slashes 68 69 $_POST = add_magic_quotes( $_POST ); // The add_user() function will strip slashes. 68 70 69 71 $id = add_user(); … … 78 80 79 81 /** 80 * Tests the controller function that expects slashed data 82 * Tests the controller function that expects slashed data. 81 83 */ 82 84 function test_edit_user() { … … 93 95 $_POST['display_name'] = $this->slash_7; 94 96 $_POST['description'] = $this->slash_3; 95 $_POST = add_magic_quotes( $_POST ); // the edit_post() function will strip slashes 97 98 $_POST = add_magic_quotes( $_POST ); // The edit_user() function will strip slashes. 96 99 97 100 $id = edit_user( $id ); … … 114 117 $_POST['display_name'] = $this->slash_2; 115 118 $_POST['description'] = $this->slash_4; 116 $_POST = add_magic_quotes( $_POST ); // the edit_post() function will strip slashes 119 120 $_POST = add_magic_quotes( $_POST ); // The edit_user() function will strip slashes. 117 121 118 122 $id = edit_user( $id ); … … 127 131 128 132 /** 129 * Tests the model function that expects slashed data 133 * Tests the model function that expects slashed data. 130 134 */ 131 135 function test_wp_insert_user() { … … 174 178 175 179 /** 176 * Tests the model function that expects slashed data 180 * Tests the model function that expects slashed data. 177 181 */ 178 182 function test_wp_update_user() {
Note: See TracChangeset
for help on using the changeset viewer.