/** * */ public function testResolveCompletePath() { $dirname = __DIR__; $this->assertSame(sprintf('%s/../resources/aukro.wsdl', $dirname), Utils::resolveCompletePath(sprintf('%s/../resources/ebaySvc.wsdl', $dirname), './folder/../aukro.wsdl')); $this->assertSame(sprintf('%s/../resources/aukro.wsdl', $dirname), Utils::resolveCompletePath(sprintf('%s/../resources/ebaySvc.wsdl', $dirname), 'folder/../aukro.wsdl')); $this->assertSame(sprintf('%s/../resources/aukro.wsdl', $dirname), Utils::resolveCompletePath(sprintf('%s/../resources/ebaySvc.wsdl', $dirname), 'folder/../toto/../aukro.wsdl')); $this->assertSame(sprintf('%s/../resources/aukro.wsdl', $dirname), Utils::resolveCompletePath(sprintf('%s/../resources/ebaySvc.wsdl', $dirname), 'aukro.wsdl')); }
/** * @see \WsdlToPhp\PackageGenerator\Parser\Wsdl\AbstractParser::parseWsdl() */ protected function parseWsdl(Wsdl $wsdl, Schema $schema = null) { foreach ($this->getTags() as $tag) { if ($tag instanceof AbstractTagImport && $tag->getLocationAttribute() != '') { $finalLocation = Utils::resolveCompletePath($this->getLocation($wsdl, $schema), $tag->getLocationAttribute()); $this->generator->addSchemaToWsdl($wsdl, $finalLocation); } } }