From 5c739372d9ddd5878946821a0790acebf63942c5 Mon Sep 17 00:00:00 2001 From: Oleg Grigoriev Date: Tue, 8 Dec 2015 16:54:01 +0300 Subject: [PATCH] Fixed test for Windows and path separators --- tests/PathsTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/PathsTest.php b/tests/PathsTest.php index b94851f..965899e 100644 --- a/tests/PathsTest.php +++ b/tests/PathsTest.php @@ -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));