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 e382390 commit 87b4d67
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/php/PDepend/Input/ExcludePathFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function testWindowsPathAsFilterPatternNotMatchesPartial()
*/
public function testExcludePathFilterRejectsFile()
{
$actual = $this->createFilteredFileList(array('/package2.php'));
$actual = $this->createFilteredFileList(array(DIRECTORY_SEPARATOR . 'package2.php'));
$expected = array('package1.php', 'package3.php');

$this->assertEquals($expected, $actual);
Expand All @@ -149,7 +149,7 @@ public function testExcludePathFilterRejectsFile()
*/
public function testExcludePathFilterRejectsFiles()
{
$actual = $this->createFilteredFileList(array('/package2.php', '*1.php'));
$actual = $this->createFilteredFileList(array(DIRECTORY_SEPARATOR . 'package2.php', '*1.php'));
$expected = array('package3.php');

$this->assertEquals($expected, $actual);
Expand All @@ -162,7 +162,7 @@ public function testExcludePathFilterRejectsFiles()
*/
public function testExcludePathFilterRejectsDirectory()
{
$actual = $this->createFilteredFileList(array('/package1'));
$actual = $this->createFilteredFileList(array(DIRECTORY_SEPARATOR . 'package1'));
$expected = array('file2.php', 'file3.php');

$this->assertEquals($expected, $actual);
Expand All @@ -175,7 +175,7 @@ public function testExcludePathFilterRejectsDirectory()
*/
public function testExcludePathFilterRejectsDirectories()
{
$actual = $this->createFilteredFileList(array('/package1', 'package3'));
$actual = $this->createFilteredFileList(array(DIRECTORY_SEPARATOR . 'package1', 'package3'));
$expected = array('file2.php');

$this->assertEquals($expected, $actual);
Expand All @@ -188,7 +188,7 @@ public function testExcludePathFilterRejectsDirectories()
*/
public function testExcludePathFilterRejectsFilesAndDirectories()
{
$actual = $this->createFilteredFileList(array('/package1', '/file3.php'));
$actual = $this->createFilteredFileList(array(DIRECTORY_SEPARATOR . 'package1', DIRECTORY_SEPARATOR . 'file3.php'));
$expected = array('file2.php');

$this->assertEquals($expected, $actual);
Expand Down

0 comments on commit 87b4d67

Please sign in to comment.