Skip to content

Commit

Permalink
set default directory xsd
Browse files Browse the repository at this point in the history
  • Loading branch information
giansalex committed Oct 26, 2018
1 parent 1379e4c commit 61ad679
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/Ubl/Resolver/UblPathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ class UblPathResolver implements PathResolverInterface
*/
public $baseDirectory;

/**
* UblPathResolver constructor.
*/
public function __construct()
{
$this->baseDirectory = __DIR__.'/../../xsd';
}

/**
* Get Path XSD.
*
Expand Down Expand Up @@ -62,9 +70,7 @@ private function getFullPath($name)

private function loadVersion(\DOMDocument $document)
{
if (!$this->versionResolver) {
$this->versionResolver = new UblVersionResolver();
}
if (!$this->versionResolver) $this->versionResolver = new UblVersionResolver();

$this->version = $this->versionResolver->getVersion($document);
}
Expand Down
1 change: 0 additions & 1 deletion tests/Ubl/UblValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ protected function setUp()
*/
public function testDocuments($filename)
{
echo $filename;
$content = file_get_contents($filename);
$result = $this->validator->isValid($content);

Expand Down

0 comments on commit 61ad679

Please sign in to comment.