Skip to content

Commit

Permalink
add get params in test
Browse files Browse the repository at this point in the history
  • Loading branch information
esvit committed Oct 17, 2013
1 parent c93a960 commit 2202167
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Bazalt/Rest/Test/BaseCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ public function send($request, $options= array())
$options['method'] = $method;
$options['uri'] = $uri;

$get = $_GET;
if (strtolower($method) == 'get' && isset($options['data'])) {
$_GET = $options['data'];
}

$request = new \Tonic\Request($options);

$resource = $this->app->getResource($request);
$response = $resource->exec();

$_GET = $get;

$body = $response->body;
if ($options['contentType'] == 'application/json') {
$body = json_decode($response->body, true);
Expand Down

0 comments on commit 2202167

Please sign in to comment.