response = new class() extends ResponseAbstract { public function toArray() : array { return [1]; } public function getBody(bool $optimize = false) : string { return ''; } }; } /** * @testdox The response has the expected default values after initialization * @covers phpOMS\Message\ResponseAbstract * @group framework */ public function testDefault() : void { self::assertNull($this->response->get('asdf')); self::assertEquals('', $this->response->getBody()); } /** * @testdox The response can be json serialized * @covers phpOMS\Message\ResponseAbstract * @group framework */ public function testJsonSerialize() : void { self::assertEquals([1], $this->response->jsonSerialize()); } /** * @testdox Data can be set and returned for the response * @covers phpOMS\Message\ResponseAbstract * @group framework */ public function testDataInputOutput() : void { $this->response->set('asdf', false); self::assertFalse($this->response->get('asdf')); } }