Skip to content

Commit 1ff7831

Browse files
jrfnlsirbrillig
authored andcommitted
Tests: allow them to work cross-platform (#108)
The tests would fail on Windows due to the mix of forward and backward slashes in the sniff file name. This simple change should allow the tests to work cross-platform.
1 parent 86212ae commit 1ff7831

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

VariableAnalysis/Tests/BaseTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ public function getErrorLineNumbersFromFile(LocalFile $phpcsFile) {
3636
}
3737

3838
public function getSniffFiles() {
39-
return [__DIR__ . '/../../VariableAnalysis/Sniffs/CodeAnalysis/VariableAnalysisSniff.php'];
39+
return [realpath(__DIR__ . '/../../VariableAnalysis/Sniffs/CodeAnalysis/VariableAnalysisSniff.php')];
4040
}
4141

4242
public function getFixture($fixtureFilename) {
43-
return __DIR__ . '/CodeAnalysis/fixtures/' . $fixtureFilename;
43+
return realpath(__DIR__ . '/CodeAnalysis/fixtures/' . $fixtureFilename);
4444
}
4545
}

0 commit comments

Comments
 (0)