Skip to content

Commit

Permalink
Fixed test for Windows and path separators
Browse files Browse the repository at this point in the history
  • Loading branch information
vasa-c committed Dec 8, 2015
1 parent 75c60b4 commit 5c73937
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/PathsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ public function testCreate($pattern, $real, $expected)
];
$paths = new Paths(__DIR__, $patterns);
$actual = $paths->create($pattern, $real);
if (substr(strtolower(PHP_OS), 0, 3) === 'win') {
if ($real && substr(strtolower(PHP_OS), 0, 3) === 'win') {
$actual = str_replace('\\', '/', $actual);
$expected = str_replace('\\', '/', $actual);
}
$this->assertSame($expected, $actual);
$this->assertSame($expected, $paths($pattern, $real));
Expand Down

0 comments on commit 5c73937

Please sign in to comment.