'n1'], '{"a":1}', [], []); $this->assertSame('POST', $r->method()); $this->assertSame('n1', $r->header('x-nonce')); $this->assertSame(['a' => 1], $r->json()); } public function testResponseJson(): void { $res = Response::json(['ok' => true], 201); $this->assertSame(201, $res->status()); $this->assertStringContainsString('application/json', $res->headers()['Content-Type']); $this->assertSame('{"ok":true}', $res->body()); } }