get(self::ENDPOINT_PATH); $this->assertSame([ 'code' => 'rest_forbidden', 'message' => 'Sorry, you are not allowed to do that.', 'data' => ['status' => 401], ], $data); } public function testRequest(): void { $data = $this->get(self::ENDPOINT_PATH); $this->assertSame(['data' => ['message' => 'Hello world.']], $data); } }