fromYaml($yaml)->getServerRequestValidator(); $psrRequest = (new ServerRequest('post', 'http://localhost:8000/api/v1/products.create')) ->withHeader('Content-Type', 'application/json') ->withBody(stream_for('{}')); $validator->validate($psrRequest); $this->addToAssertionCount(1); } }