@@ -68,84 +68,84 @@ public function testHandlerAssociations(string $method, string $type, string $ur
6868
6969 public function handlerAssociationScenarios (): Generator
7070 {
71- $ type = $ this ->faker ()->slug ;
71+ $ type = $ this ->faker ()->slug () ;
7272 $ uri = sprintf (
7373 'http://%s/%s/%s/relationships/%s ' ,
74- $ this ->faker ()->domainName ,
74+ $ this ->faker ()->domainName () ,
7575 $ type ,
7676 $ this ->faker ()->numberBetween (),
77- $ this ->faker ()->slug
77+ $ this ->faker ()->slug ()
7878 );
7979 yield ['GET ' , $ type , $ uri , 'fetchRelationship ' ];
8080
81- $ type = $ this ->faker ()->slug ;
81+ $ type = $ this ->faker ()->slug () ;
8282 $ uri = sprintf (
8383 'http://%s/%s/%s ' ,
84- $ this ->faker ()->domainName ,
84+ $ this ->faker ()->domainName () ,
8585 $ type ,
8686 $ this ->faker ()->numberBetween ()
8787 );
8888 yield ['GET ' , $ type , $ uri , 'fetchResource ' ];
8989
90- $ type = $ this ->faker ()->slug ;
90+ $ type = $ this ->faker ()->slug () ;
9191 $ uri = sprintf (
9292 'http://%s/%s ' ,
93- $ this ->faker ()->domainName ,
93+ $ this ->faker ()->domainName () ,
9494 $ type
9595 );
9696 yield ['GET ' , $ type , $ uri , 'fetchResources ' ];
9797
98- $ type = $ this ->faker ()->slug ;
98+ $ type = $ this ->faker ()->slug () ;
9999 $ uri = sprintf (
100100 'http://%s/%s/%s/relationships/%s ' ,
101- $ this ->faker ()->domainName ,
101+ $ this ->faker ()->domainName () ,
102102 $ type ,
103103 $ this ->faker ()->numberBetween (),
104- $ this ->faker ()->slug
104+ $ this ->faker ()->slug ()
105105 );
106106 yield ['POST ' , $ type , $ uri , 'addRelatedResources ' ];
107107
108- $ type = $ this ->faker ()->slug ;
108+ $ type = $ this ->faker ()->slug () ;
109109 $ uri = sprintf (
110110 'http://%s/%s ' ,
111- $ this ->faker ()->domainName ,
111+ $ this ->faker ()->domainName () ,
112112 $ type
113113 );
114114 yield ['POST ' , $ type , $ uri , 'createResource ' ];
115115
116- $ type = $ this ->faker ()->slug ;
116+ $ type = $ this ->faker ()->slug () ;
117117 $ uri = sprintf (
118118 'http://%s/%s/%s/relationships/%s ' ,
119- $ this ->faker ()->domainName ,
119+ $ this ->faker ()->domainName () ,
120120 $ type ,
121121 $ this ->faker ()->numberBetween (),
122- $ this ->faker ()->slug
122+ $ this ->faker ()->slug ()
123123 );
124124 yield ['PATCH ' , $ type , $ uri , 'replaceRelatedResources ' ];
125125
126- $ type = $ this ->faker ()->slug ;
126+ $ type = $ this ->faker ()->slug () ;
127127 $ uri = sprintf (
128128 'http://%s/%s/%s ' ,
129- $ this ->faker ()->domainName ,
129+ $ this ->faker ()->domainName () ,
130130 $ type ,
131131 $ this ->faker ()->numberBetween ()
132132 );
133133 yield ['PATCH ' , $ type , $ uri , 'patchResource ' ];
134134
135- $ type = $ this ->faker ()->slug ;
135+ $ type = $ this ->faker ()->slug () ;
136136 $ uri = sprintf (
137137 'http://%s/%s/%s/relationships/%s ' ,
138- $ this ->faker ()->domainName ,
138+ $ this ->faker ()->domainName () ,
139139 $ type ,
140140 $ this ->faker ()->numberBetween (),
141- $ this ->faker ()->slug
141+ $ this ->faker ()->slug ()
142142 );
143143 yield ['DELETE ' , $ type , $ uri , 'removeRelatedResources ' ];
144144
145- $ type = $ this ->faker ()->slug ;
145+ $ type = $ this ->faker ()->slug () ;
146146 $ uri = sprintf (
147147 'http://%s/%s/%s ' ,
148- $ this ->faker ()->domainName ,
148+ $ this ->faker ()->domainName () ,
149149 $ type ,
150150 $ this ->faker ()->numberBetween ()
151151 );
@@ -154,10 +154,10 @@ public function handlerAssociationScenarios(): Generator
154154
155155 public function testUnknownType (): void
156156 {
157- $ type = $ this ->faker ()->slug ;
157+ $ type = $ this ->faker ()->slug () ;
158158 $ uri = sprintf (
159159 'http://%s/%s/%s ' ,
160- $ this ->faker ()->domainName ,
160+ $ this ->faker ()->domainName () ,
161161 $ type ,
162162 $ this ->faker ()->numberBetween ()
163163 );
@@ -168,25 +168,25 @@ public function testUnknownType(): void
168168
169169 public function testInvalidContentType (): void
170170 {
171- $ type = $ this ->faker ()->slug ;
171+ $ type = $ this ->faker ()->slug () ;
172172 $ uri = sprintf (
173173 'http://%s/%s/%s ' ,
174- $ this ->faker ()->domainName ,
174+ $ this ->faker ()->domainName () ,
175175 $ type ,
176176 $ this ->faker ()->numberBetween ()
177177 );
178178 $ request = new Request ('GET ' , new Uri ($ uri ));
179- $ request ->headers ()->set ('Content-Type ' , $ this ->faker ()->slug );
179+ $ request ->headers ()->set ('Content-Type ' , $ this ->faker ()->slug () );
180180 $ this ->expectExceptionObject (new UnsupportedMediaTypeException ($ request ->headers ()->get ('Content-Type ' )));
181181 $ this ->server ->handleRequest ($ request );
182182 }
183183
184184 public function testInvalidHttpMethod (): void
185185 {
186- $ type = $ this ->faker ()->slug ;
186+ $ type = $ this ->faker ()->slug () ;
187187 $ this ->server ->addHandler ($ type , $ this ->requestHandler );
188188
189- $ method = $ this ->faker ()->userName ;
189+ $ method = $ this ->faker ()->userName () ;
190190 $ request = $ this ->createMock (Request::class);
191191
192192 $ headers = new KeyValueCollection (['Content-Type ' => JsonApiInterface::CONTENT_TYPE ]);
@@ -206,12 +206,12 @@ public function testCreateRequestBodyEmpty(): void
206206 public function testCreateRequestBodyInvalidJson (): void
207207 {
208208 $ this ->expectException (BadRequestException::class);
209- $ this ->server ->createRequestBody ($ this ->faker ()->text );
209+ $ this ->server ->createRequestBody ($ this ->faker ()->text () );
210210 }
211211
212212 public function testCreateRequestBody (): void
213213 {
214- $ data = [$ this ->faker ()->text ];
214+ $ data = [$ this ->faker ()->text () ];
215215 $ jsonData = json_encode ($ data );
216216 $ document = $ this ->createMock (DocumentInterface::class);
217217 $ this ->deserializer ->expects (self ::once ())->method ('deserializeDocument ' )->with ($ data )->willReturn ($ document );
@@ -241,7 +241,7 @@ public function testCreateResponseBodyInvalidJson(): void
241241 public function testCreateResponseBody (): void
242242 {
243243 $ response = $ this ->createMock (ResponseInterface::class);
244- $ data = [$ this ->faker ()->text ];
244+ $ data = [$ this ->faker ()->text () ];
245245
246246 $ document = $ this ->createMock (DocumentInterface::class);
247247 $ response ->method ('document ' )->willReturn ($ document );
@@ -253,7 +253,7 @@ public function testCreateResponseBody(): void
253253 public function testHandleException (): void
254254 {
255255 $ throwable = $ this ->createMock (Throwable::class);
256- $ debug = $ this ->faker ()->boolean ;
256+ $ debug = $ this ->faker ()->boolean () ;
257257 $ apiError = Error::createFrom ($ throwable , $ debug );
258258
259259 $ document = new Document ();
0 commit comments