Skip to content

Commit

Permalink
Fixed tests on Windows - use DIRECTORY_SEPARATOR
Browse files Browse the repository at this point in the history
  • Loading branch information
KacerCZ authored and emirb committed Nov 20, 2017
1 parent 87b4d67 commit 399bae8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/php/PDepend/AbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ protected function createRunResourceURI($fileName = null)
*/
protected function createCodeResourceURI($fileName)
{
$uri = realpath(__DIR__ . '/../../resources/files') . '/' . $fileName;
$uri = realpath(__DIR__ . '/../../resources/files') . DIRECTORY_SEPARATOR . $fileName;

if (file_exists($uri) === false) {
throw new \ErrorException("File '{$fileName}' does not exists.");
Expand Down Expand Up @@ -724,7 +724,7 @@ protected function createCodeResourceUriForTest()
array_unshift($parts, strtolower(array_shift($parts)));
}

$fileName = substr(join('/', $parts), 0, -4) . "/{$method}";
$fileName = substr(join(DIRECTORY_SEPARATOR, $parts), 0, -4) . DIRECTORY_SEPARATOR . $method;
try {
return $this->createCodeResourceURI($fileName);
} catch (\ErrorException $e) {
Expand Down

0 comments on commit 399bae8

Please sign in to comment.