Commit 83bfa39
committed
fix: Split multiple slashes tests into three
- `testPathWithMultipleSlashes()` modified to have a path with multiple slashes only in the middle of the path.
- Renames `testProperlyTrimsLeadingSlashesToPreventXSS()` to `testGetPathNormalizesMultipleLeadingSlashesToSingleSlashToPreventXSS()`, and has it assert only against results of `getPath()`; on completion, it returns an associative array with the expected URI string and the URI instance.
- Adds `testStringRepresentationWithMultipleSlashes()`; depends on `testGetPathNormalizesMultipleLeadingSlashesToSingleSlashToPreventXSS()`, and asserts that the string representation is identical to the original URI string.
Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>1 parent 8fb9b12 commit 83bfa39
1 file changed
+25
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
240 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
241 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
242 | 260 | | |
243 | 261 | | |
244 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
245 | 267 | | |
246 | | - | |
247 | | - | |
248 | | - | |
| 268 | + | |
249 | 269 | | |
250 | 270 | | |
0 commit comments