Make WordPress Core

Ticket #21767: wp-slash-testing-steps.txt

File wp-slash-testing-steps.txt, 3.3 KB (added by alexkingorg, 14 years ago)

Testing steps

Line 
1## Testing steps
2
3**Post**
4- X new via UI
5- X update via UI
6- X new via code
7- X update via code
8
9```php
10function test_slash_post_add() {
11 wp_insert_post(array(
12 'post_title' => 'Title with three slashes \\\',
13 'post_content' => 'Content with three slashes \\\',
14 'post_status' => 'publish'
15 ));
16 die(__FUNCTION__);
17}
18// add_action('init', 'test_slash_post_add');
19
20function test_slash_post_update() {
21 wp_insert_post(array(
22 'ID' => 10277,
23 'post_title' => 'Title with five slashes \\\\\',
24 'post_content' => 'Content with five slashes \\\\\',
25 'post_status' => 'publish'
26 ));
27 die(__FUNCTION__);
28}
29// add_action('init', 'test_slash_post_update');
30```
31
32**Category**
33- X new via UI (post screen)
34- X new via UI
35- X update via UI
36- X update via UI (quick edit)
37- X new via code
38- update via code
39
40```php
41function test_slash_cat_add() {
42 wp_insert_term(
43 'Test Cat with three slashes \\\',
44 'category',
45 array(
46 'description' => 'Content with five slashes \\\\\',
47 'slug' => 'test-cat-with-three-slashes-999'
48 )
49 );
50 die(__FUNCTION__);
51}
52// add_action('init', 'test_slash_cat_add');
53
54function test_slash_cat_update() {
55 wp_update_term(
56 213,
57 'category',
58 array(
59 'name' => 'Content with three slashes \\\',
60 'description' => 'Content with seven slashes \\\\\\\',
61 'slug' => 'test-cat-with-three-slashes-999'
62 )
63 );
64 die(__FUNCTION__);
65}
66// add_action('init', 'test_slash_cat_update');
67```
68
69**Tag**
70- X new via UI (post screen)
71- X new via UI
72- X update via UI
73- X update via UI (quick edit)
74- X new via code
75- X update via code
76
77**User**
78- X new via UI
79- X update via UI
80- X new via code
81- X update via code
82
83```php
84function test_slash_user_add() {
85 wp_insert_user(array(
86 'user_login' => 'slash-user-2',
87 'user_pass' => 'slash-user-2',
88 'user_nicename' => 'slash-user-2',
89 'display_name' => 'User with three slashes \\\',
90 'first_name' => 'First \\\',
91 'last_name' => 'Last \\\',
92 'description' => 'Description with three slashes \\\',
93 ));
94 die(__FUNCTION__);
95}
96add_action('init', 'test_slash_user_add');
97
98function test_slash_user_update() {
99 wp_update_user(array(
100 'ID' => 4,
101 'user_login' => 'slash-user-2',
102 'user_pass' => 'slash-user-2',
103 'user_nicename' => 'slash-user-2',
104 'display_name' => 'User with five slashes \\\\\',
105 'first_name' => 'First \\\\\',
106 'last_name' => 'Last \\\\\',
107 'description' => 'Description with five slashes \\\\\',
108 ));
109 die(__FUNCTION__);
110}
111add_action('init', 'test_slash_user_update');
112```
113
114**Attachment**
115- X new via UI
116- X update via UI
117- new via code
118- update via code
119
120**Comment**
121- X new via UI (front-end)
122- X new via UI (admin)
123- X update via UI (quick edit)
124- X update via UI
125- X new via code
126- X update via code
127
128```php
129function test_slash_comment_add() {
130 wp_insert_comment(array(
131 'comment_post_ID' => 10269,
132 'comment_author' => 'Name with three slashes \\\\\\',
133 'comment_author_email' => 'test@example.com',
134 'comment_content' => 'Content with five slashes \\\\\\\\\\',
135 ));
136 die(__FUNCTION__);
137}
138// add_action('init', 'test_slash_comment_add');
139
140function test_slash_comment_update() {
141 wp_update_comment(array(
142 'comment_ID' => 85,
143 'comment_author' => 'Name with five slashes \\\\\\\\\\',
144 'comment_content' => 'Content with seven slashes \\\\\\\\\\\\\\',
145 ));
146 die(__FUNCTION__);
147}
148// add_action('init', 'test_slash_comment_update');
149```