response = new class extends ResponseAbstract { public function toArray() : array { return [1]; } public function getBody() : string { return ''; } }; } public function testDefault() { self::assertEquals(null, $this->response->get('asdf')); self::assertEquals('', $this->response->getBody()); } public function testSetGet() { self::assertEquals([1], $this->response->jsonSerialize()); $this->response->set('asdf', false); self::assertEquals(false, $this->response->get('asdf')); } }