Skip to content

Commit

Permalink
Fix tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
halftan committed Jan 5, 2017
1 parent afc664c commit 78fcf8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions specs/utils/pathresolver.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
it('returns path from parent', function() {
expect(
$this->path->relative('/path/root', '/path/root/folder/project')
)->to->be->equal('folder/project');
)->to->be->equal(implode(DIRECTORY_SEPARATOR, ['folder', 'project']));
});
it('returns path from parent with ./', function() {
expect(
$this->path->relative('/path/root/', '/path/root/folder/project', true)
)->to->be->equal('./folder/project');
)->to->be->equal(implode(DIRECTORY_SEPARATOR, ['.', 'folder', 'project']));
});
it('returns path from sibling', function() {
expect(
$this->path->relative('/path/root/another/project/inner/', '/path/root/folder/project')
)->to->be->equal('../../../folder/project');
)->to->be->equal(implode(DIRECTORY_SEPARATOR, ['..', '..', '..', 'folder', 'project']));
});
});
});
2 changes: 1 addition & 1 deletion src/Padawan/Framework/Complete/CompleteEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function findEntries(Project $project, Scope $scope, $badLine, $column
* Should check for bad lines
*/
protected function prepareContent($content, $line, $column) {
$lines = explode(PHP_EOL, $content);
$lines = explode("\n", $content);
if ($line > count($lines)) {
$badLine = "";
} else {
Expand Down

0 comments on commit 78fcf8e

Please sign in to comment.