Commit 47c9f7e
committed
test[faustwp]: widen AuthCallbacks coverage and document home_url() filter caveat
Three small additions on top of the regression-test commits:
1. Assert that the redirect_uri query arg is preserved through to the
wp-login redirect_to param, in both the standard and Bedrock cases.
A future change that successfully matched the request but mangled or
dropped redirect_uri would previously slip through.
2. Add test_wp_in_subdirectory_install_matches_with_home_url for the
Codex-documented 'Giving WordPress its own directory' pattern -- WP
core in /wordpress, public site at root. Different prefix from Bedrock,
same shape of divergence. Proves the fix is not a /wp-special case.
Renames set_bedrock_siteurl() to set_split_install_siteurl($suffix)
so both tests share the helper.
3. Document the home_url() filter dependency in handle_generate_endpoint()'s
docblock. Multilingual plugins (WPML, Polylang, TranslatePress) that
filter home_url() to prepend locale paths can still cause this match to
miss for non-locale-prefixed frontend callers. Notes the likely follow-up
direction (REST route migration) so the next person to touch this knows
what they're inheriting.
Suite is now 5 tests / 14 assertions. Verified red-on-revert: both the
Bedrock and WP-in-subdirectory tests fail cleanly when callbacks.php is
reverted to site_url(); restoring home_url() greens both single-site and
multisite suites.1 parent 4a595d4 commit 47c9f7e
2 files changed
Lines changed: 55 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
78 | 83 | | |
79 | | - | |
| 84 | + | |
80 | 85 | | |
81 | | - | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
101 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
102 | 110 | | |
103 | 111 | | |
104 | 112 | | |
| |||
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
111 | 124 | | |
112 | 125 | | |
113 | 126 | | |
| |||
119 | 132 | | |
120 | 133 | | |
121 | 134 | | |
122 | | - | |
| 135 | + | |
123 | 136 | | |
124 | 137 | | |
125 | 138 | | |
| |||
137 | 150 | | |
138 | 151 | | |
139 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
140 | 180 | | |
141 | 181 | | |
142 | 182 | | |
| |||
0 commit comments