Skip to content

Commit 5007eb1

Browse files
committed
Test function documentation for HTTP header helpers
1 parent c503910 commit 5007eb1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/csrfprotector_test.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ public static function changeRequestType($type)
1515
self::$requestType = $type;
1616
}
1717

18+
/**
19+
* Function to check for a string value anywhere within HTTP response headers
20+
* Returns true on first match of $needle in header names or values
21+
*/
1822
public static function checkHeader($needle)
1923
{
2024
$haystack = xdebug_get_headers();
@@ -25,6 +29,10 @@ public static function checkHeader($needle)
2529
return false;
2630
}
2731

32+
/**
33+
* Function to return the string value of the last response header
34+
* identified by name $needle
35+
*/
2836
public static function getHeaderValue($needle)
2937
{
3038
$haystack = xdebug_get_headers();

0 commit comments

Comments
 (0)