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' => $example]))); $validator->validate($psrRequest); $this->addToAssertionCount(1); } /** * @return mixed[] */ public function getNullableTypeExamples() : array { return [ 'nullable null' => [null], 'nullable array' => [[123]], ]; } }