Skip to content

Commit f1a1074

Browse files
authored
Merge pull request #27 from hochanh/master
Add custom headers for test client
2 parents b78e464 + 243704e commit f1a1074

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/There4/Slim/Test/WebTestClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ private function request($method, $path, $data = array(), $optionalHeaders = arr
8888
$env = Slim\Environment::getInstance();
8989
$this->app->router = new NoCacheRouter($this->app->router);
9090
$this->app->request = new Slim\Http\Request($env);
91+
// Custom headers
92+
$this->app->request->headers = new Slim\Http\Headers($env);
9193
$this->app->response = new Slim\Http\Response();
9294

9395
// Establish some useful references to the slim app properties

0 commit comments

Comments
 (0)