Skip to content

Commit

Permalink
Test function documentation for HTTP header helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
mberkowski committed Nov 4, 2016
1 parent c503910 commit 5007eb1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/csrfprotector_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ public static function changeRequestType($type)
self::$requestType = $type;
}

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

/**
* Function to return the string value of the last response header
* identified by name $needle
*/
public static function getHeaderValue($needle)
{
$haystack = xdebug_get_headers();
Expand Down

0 comments on commit 5007eb1

Please sign in to comment.