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