Originally part of #2171683: Remove all Simpletest overrides and rely on native multi-site functionality instead:
The verbose output of headers in WebTestBase
- does not output HTTP request headers (which are sometimes needed for debugging)
- does output HTTP response headers, but they are dumped as a weird array.
Fixing this is especially useful for debugging Simpletest, but also for e.g. RESTTestBase.
This change is independent from the parent issue and was only included there, because I had to debug and find out why some test requests were not hitting the test site (which was ultimately caused by something else).
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 2176043-13.patch | 11.49 KB | rpayanm |
| #11 | interdiff.txt | 5.39 KB | sun |
| #11 | test.headers.11.patch | 11.63 KB | sun |
| #8 | drupal8.test-headers.8.patch | 9.94 KB | sun |
| #6 | drupal8.test-headers.6.patch | 9.74 KB | sun |
Comments
Comment #1
dawehnerHave we actually thought of using guzzle instead of raw CURL, just an off-topic question.
Any reason we don't use String::checkPlain? We could also move this + the for loop into a helper method.
wonder whether it is sane to store trim($header);
Comment #2
sunThinking about this some more, I wondered:
Wouldn't it make sense to drop the
WebTestBase::$dumpHeadersproperty and output these large chunks of request/response headers in (native) DETAILS instead?► Request: GET /user/1
► Response: 200 OK
▼ Request: GET /node/2
...
...
► Response: 200 OK
→ Use a modern, standards-compliant browser (like Chrome) to get the proper, HTML5 standard details behavior.
If you do not, bad luck.
Comment #3
jibrandrupal8.test-headers.0.patch queued for re-testing.
Comment #4
sunNow, how awesome is this:
Comment #6
sunOopsie ;)
Comment #7
jibranshould be array.
please add comment here to explain it.
Please us heredoc.
Comment #8
sun1+2 done.
Not going to do 3, because it does not improve the markup generation in any way (and only adds more complexity to this verbose output code).
Comment #9
sun#2182315: simpletest verbose output doesn't show end result of a drupalPostAjaxForm() added verbose output to
drupalPostAjax()just a few hours before I rolled the last patch, which does not appear to be covered here yet.Comment #10
sunComment #11
sunComment #12
jhedstromComment #13
rpayanmComment #17
mgiffordUnassigning so someone else can take it on.
Comment #26
quietone commentedTriaging issues in simpletest.module as part of the Bug Smash Initiative to determine if they should be in the Simpletest Project or core.
This looks like it belongs in the Simpletest project.