Skip to content

Commit

Permalink
Normalize path for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Nov 13, 2021
1 parent 71817c5 commit 6736a4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Fortress/ServerSideValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class ServerSideValidator extends Validator implements ServerSideValidatorInterf
*/
protected $translator;

/** Create a new server-side validator.
/**
* Create a new server-side validator.
*
* @param RequestSchemaInterface $schema A RequestSchemaInterface object, containing the validation rules.
* @param Translator $translator A Translator to be used to translate message ids found in the schema.
Expand Down
4 changes: 2 additions & 2 deletions tests/UniformResourceLocator/ResourceLocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public function testFindResourceOutsideMainPath(): void

$resource = $locator->findResource('files://blah.json');

$this->assertSame(__DIR__.'/Building/Garage/files/blah.json', $resource);
$this->assertSame(Normalizer::normalizePath(__DIR__).'Building/Garage/files/blah.json', $resource);
}

/**
Expand All @@ -477,6 +477,6 @@ public function testListResourceOutsideMainPath(): void

$resources = $locator->listResources('files://', true);

$this->assertSame(__DIR__.'/Building/Garage/files/blah.json', $resources[0]->getAbsolutePath());
$this->assertSame(Normalizer::normalizePath(__DIR__).'Building/Garage/files/blah.json', $resources[0]->getAbsolutePath());
}
}

0 comments on commit 6736a4a

Please sign in to comment.