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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

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

sdboyer’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
71.66 KB
1.92 KB

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

header-dump.png

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

nice, this is even more RTBCerer now.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

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

sdboyer’s picture

Status: Needs work » Needs review
FileSize
2.01 KB
3.46 KB

good point. new patch.

Status: Needs review » Needs work

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

sdboyer’s picture

Status: Needs work » Needs review

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

sdboyer’s picture

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

Niklas Fiekas’s picture

Status: Needs review » Reviewed & tested by the community

RTBC once more. Also nicely shows the post fields.

Anonymous’s picture

sdboyer++

catch’s picture

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.