Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
run drupal_get_headers, then add more headers (starting with X-) and then run it again and then assert that the difference is what you set.
Comment | File | Size | Author |
---|---|---|---|
#1 | common.test.patch | 1.7 KB | dawehner |
Comments
Comment #1
dawehnerhere is a patch | it tests some static and some random headers
Comment #2
cwgordon7 CreditAttribution: cwgordon7 commentedThis has a few coding standards issues:
1.
+ * Test drupal_get_headers()
should have a period at the end.2.
+class DrupalGETHeadersTestCase
should be DrupalGetHeadersTestCase for consistency.3.
+ * Implementation of hook_getInfo()
should be+ * Implementation of getInfo().
4.
+ );
should be less indented.5.
+ function testDrupalGETHeaders() {
should be+ function testDrupalGetHeaders() {
for consistency.6.
testDrupalGetHeaders
should have a comment block.7. All comments should begin with a capital letter and end with a period.
Also, a minor concern - won't this also *actually send out the header* during the batch request, making everything confused?
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedObviously this cannot work. We need to create a special test module registering a menu path that returns special headers.
Comment #4
catchFixing the critical / pending bugs queues to reflect things which are really bugs or release critical.