Skip to content

Commit

Permalink
Merge pull request #27 from hochanh/master
Browse files Browse the repository at this point in the history
Add custom headers for test client
  • Loading branch information
craig-davis authored Aug 2, 2016
2 parents b78e464 + 243704e commit f1a1074
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/There4/Slim/Test/WebTestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ private function request($method, $path, $data = array(), $optionalHeaders = arr
$env = Slim\Environment::getInstance();
$this->app->router = new NoCacheRouter($this->app->router);
$this->app->request = new Slim\Http\Request($env);
// Custom headers
$this->app->request->headers = new Slim\Http\Headers($env);
$this->app->response = new Slim\Http\Response();

// Establish some useful references to the slim app properties
Expand Down

0 comments on commit f1a1074

Please sign in to comment.