Skip to content

Commit fd4ccde

Browse files
committed
Fix test for *nix
1 parent cadb811 commit fd4ccde

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/local-filename-test.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,22 @@ public static function setUpBeforeClass(): void
1515
// self::$dm::$log_dump = true;
1616
}
1717

18+
private function fix($s) {
19+
return str_replace("\\", DIRECTORY_SEPARATOR, $s);
20+
}
21+
1822
public function testLocalFilename(): void
1923
{
2024
$this->assertEquals(
21-
'\tests\resources\phars\testgroup-testname-1-1-1.phar',
25+
$this->fix('\tests\resources\phars\testgroup-testname-1-1-1.phar'),
2226
substr(self::$dm->local_file_name("testgroup", "testname", "1.1.1", "phar", null), -52)
2327
);
2428
$this->assertEquals(
25-
'\tests\resources\phars\testgroup-testname-1-1-1.phar',
29+
$this->fix('\tests\resources\phars\testgroup-testname-1-1-1.phar'),
2630
substr(self::$dm->local_file_name("testgroup", "testname", "1.1.1", "phar", null, 'dne'), -52)
2731
);
2832
$this->assertEquals(
29-
'\tests\resources\other\testgroup-testname-1-1-1.phar',
33+
$this->fix('\tests\resources\other\testgroup-testname-1-1-1.phar'),
3034
substr(self::$dm->local_file_name("testgroup", "testname", "1.1.1", "phar", null, 'other'), -52)
3135
);
3236
}

0 commit comments

Comments
 (0)