fromYaml($yaml)->getServerRequestValidator(); $psrRequest = (new ServerRequest('get', 'http://localhost:8000/api/v1/test/whatever')); $this->expectException(InvalidSchema::class); $validator->validate($psrRequest); } }