> */ public function validDataProvider() : array { return [ // matches server: https://localhost/v1 [new ServerRequest('get', '/v1/products')], [new ServerRequest('get', 'http://anyhost/v1/products')], [new ServerRequest('get', 'https://localhost/v1/products')], // matches server: /v2 [new ServerRequest('get', '/v2/products')], [new ServerRequest('get', 'http://anyhost/v2/products')], // matches overridden server: https://special.host/v3 [new ServerRequest('get', '/v3/products/overridden')], [new ServerRequest('get', 'http://anyhost/v3/products/overridden')], // matches overridden server: /v4 [new ServerRequest('get', '/v4/products/overridden')], [new ServerRequest('get', 'http://anyhost/v4/products/overridden')], [new ServerRequest('get', 'https://special.host/v4/products/overridden')], ]; } /** * @dataProvider validDataProvider */ public function testItAllowsRelativesServerUrlsGreen(ServerRequest $request) : void { $spec = <<fromYaml($spec)->getServerRequestValidator(); $validator->validate($request); $this->addToAssertionCount(1); } }