Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
try this->getFileHelper()->normalizePath() instead of str_replace()
  • Loading branch information
staabm authored Nov 11, 2019
commit 84c2bff997d02ecab2b6d797a4066f3267af73d9
4 changes: 2 additions & 2 deletions src/Testing/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ public function getFileHelper(): FileHelper
*/
protected function assertSamePaths(string $expected, string $actual, string $message = ''): void
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put his helper in the base-class because I guess it can be re-used to fix a few of the remaining 6 windows-only testsuite errors

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with that, but try using FileHelper instead of str_replace.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it doesn't succeed, I'm gonna merge this as it is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using normalizePath will make the test error on windows travis CI

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it passes.

{
$expected = str_replace('/', DIRECTORY_SEPARATOR, $expected);
$actual = str_replace('/', DIRECTORY_SEPARATOR, $actual);
$expected = $this->getFileHelper()->normalizePath($expected);
$actual = $this->getFileHelper()->normalizePath($actual);

$this->assertSame($expected, $actual, $message);
}
Expand Down