public function testHelper() { $request = get($this->app, '/', ['key' => 'value']); $this->app->get('/', function () { return $this->query; }); $result = $request->run(); $this->assertEquals($result->status, 200); $this->assertEquals($result->body, json_encode(['key' => 'value'])); }
public function testParamDocString() { $request = get($this->app, '/9', ['key' => 'value']); /** * @param int $id */ $this->app->get('/:id', function ($id, $key) { return $this->params; }); $result = $request->run(); $this->assertEquals($result->body, json_encode(['key' => 'value', 'id' => 9])); $this->assertEquals($result->status, 200); }