@@ -159,10 +159,9 @@ public function specProvider()
159159 $ it ->next ();
160160 }
161161
162- // examples from https://github.com/Nexmo/api-specification/tree/master/definitions
163162 $ nexmoExamples = [];
164163 /** @var $it RecursiveDirectoryIterator|RecursiveIteratorIterator */
165- $ it = new RecursiveIteratorIterator (new RecursiveDirectoryIterator (__DIR__ . '/../../vendor/nexmo/api-specification /definitions ' ));
164+ $ it = new RecursiveIteratorIterator (new RecursiveDirectoryIterator (__DIR__ . '/../resources /definitions ' ));
166165 $ it ->rewind ();
167166 while ($ it ->valid ()) {
168167 if ($ it ->getExtension () === 'yml '
@@ -181,9 +180,8 @@ public function specProvider()
181180 $ nexmoExamples
182181 );
183182 foreach ($ all as $ path ) {
184- $ pathWithoutVendorPrefix = substr ($ path , strlen (__DIR__ . '/../../vendor/ ' ));
185- yield $ pathWithoutVendorPrefix => [
186- $ pathWithoutVendorPrefix
183+ yield $ path => [
184+ $ path
187185 ];
188186 }
189187 }
@@ -194,10 +192,10 @@ public function specProvider()
194192 public function testSpecs ($ openApiFile )
195193 {
196194 if (strtolower (substr ($ openApiFile , -5 , 5 )) === '.json ' ) {
197- $ json = json_decode (file_get_contents (__DIR__ . ' /../../vendor/ ' . $ openApiFile ), true );
195+ $ json = json_decode (file_get_contents ($ openApiFile ), true );
198196 $ openapi = new OpenApi ($ json );
199197 } else {
200- $ yaml = Yaml::parse (file_get_contents (__DIR__ . ' /../../vendor/ ' . $ openApiFile ));
198+ $ yaml = Yaml::parse (file_get_contents ($ openApiFile ));
201199 $ openapi = new OpenApi ($ yaml );
202200 }
203201 $ openapi ->setDocumentContext ($ openapi , new \cebe \openapi \json \JsonPointer ('' ));
0 commit comments