For certain tests, it's useful to be able to inspect the headers being sent in response to get requests (we're needing this over in #1984766: Change notice: Start relying on Request/Response objects for cache handling, for example). This patch adds support for automatically dumping headers via the verbose() method when a new $dumpHeaders property is set to TRUE. it defaults to FALSE in WebTestBase.

Files: 
CommentFileSizeAuthor
#8 dump-headers-2004908-5.patch3.46 KBsdboyer
PASSED: [[SimpleTest]]: [MySQL] 56,041 pass(es).
[ View ]
#5 dump-headers-2004908-5.patch3.46 KBsdboyer
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]
#5 interdiff.txt2.01 KBsdboyer
#2 dump-headers-2004908-2.patch1.92 KBsdboyer
PASSED: [[SimpleTest]]: [MySQL] 57,833 pass(es).
[ View ]
#2 header-dump.png71.66 KBsdboyer
dump-headers.patch1.88 KBsdboyer
PASSED: [[SimpleTest]]: [MySQL] 55,919 pass(es).
[ View ]

Comments

Status:Needs review» Reviewed & tested by the community

yes, this is a simple, useful addition. RTBC.

Status:Reviewed & tested by the community» Needs review
StatusFileSize
new71.66 KB
new1.92 KB
PASSED: [[SimpleTest]]: [MySQL] 57,833 pass(es).
[ View ]

sorry, just tweaked this a bit to make the output more readable (trimmed header strings). here's how it looks:

header-dump.png

Status:Needs review» Reviewed & tested by the community

nice, this is even more RTBCerer now.

Status:Reviewed & tested by the community» Needs work

I think we should add this to drupalPost too...

Status:Needs work» Needs review
StatusFileSize
new2.01 KB
new3.46 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]

good point. new patch.

Status:Needs review» Needs work

The last submitted patch, dump-headers-2004908-5.patch, failed testing.

Status:Needs work» Needs review

#5: dump-headers-2004908-5.patch queued for re-testing.

StatusFileSize
new3.46 KB
PASSED: [[SimpleTest]]: [MySQL] 56,041 pass(es).
[ View ]

reposting the same patch in the hopes that testbot pulls its head out of its rear.

Status:Needs review» Reviewed & tested by the community

RTBC once more. Also nicely shows the post fields.

sdboyer++

Status:Reviewed & tested by the community» Fixed

Committed/pushed to 8.x, thanks!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.