Skip to content

Commit

Permalink
RawErrorFormatterTest - fix on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 2, 2020
1 parent 26d27be commit dcb7bc2
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions tests/PHPStan/Command/ErrorFormatter/RawErrorFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace PHPStan\Command\ErrorFormatter;

use PHPStan\Testing\ErrorFormatterTestCase;
use const PHP_EOL;

class RawErrorFormatterTest extends ErrorFormatterTestCase
{
Expand All @@ -22,53 +23,48 @@ public function dataFormatterOutputProvider(): iterable
1,
1,
0,
'/data/folder/with space/and unicode 😃/project/folder with unicode 😃/file name with "spaces" and unicode 😃.php:4:Foo
',
'/data/folder/with space/and unicode 😃/project/folder with unicode 😃/file name with "spaces" and unicode 😃.php:4:Foo' . PHP_EOL,
];

yield [
'One generic error',
1,
0,
1,
'?:?:first generic error
',
'?:?:first generic error' . PHP_EOL,
];

yield [
'Multiple file errors',
1,
4,
0,
'/data/folder/with space/and unicode 😃/project/folder with unicode 😃/file name with "spaces" and unicode 😃.php:2:Bar
/data/folder/with space/and unicode 😃/project/folder with unicode 😃/file name with "spaces" and unicode 😃.php:4:Foo
/data/folder/with space/and unicode 😃/project/foo.php:1:Foo
/data/folder/with space/and unicode 😃/project/foo.php:5:Bar
',
'/data/folder/with space/and unicode 😃/project/folder with unicode 😃/file name with "spaces" and unicode 😃.php:2:Bar' . PHP_EOL .
'/data/folder/with space/and unicode 😃/project/folder with unicode 😃/file name with "spaces" and unicode 😃.php:4:Foo' . PHP_EOL .
'/data/folder/with space/and unicode 😃/project/foo.php:1:Foo' . PHP_EOL .
'/data/folder/with space/and unicode 😃/project/foo.php:5:Bar' . PHP_EOL,
];

yield [
'Multiple generic errors',
1,
0,
2,
'?:?:first generic error
?:?:second generic error
',
'?:?:first generic error' . PHP_EOL .
'?:?:second generic error' . PHP_EOL,
];

yield [
'Multiple file, multiple generic errors',
1,
4,
2,
'?:?:first generic error
?:?:second generic error
/data/folder/with space/and unicode 😃/project/folder with unicode 😃/file name with "spaces" and unicode 😃.php:2:Bar
/data/folder/with space/and unicode 😃/project/folder with unicode 😃/file name with "spaces" and unicode 😃.php:4:Foo
/data/folder/with space/and unicode 😃/project/foo.php:1:Foo
/data/folder/with space/and unicode 😃/project/foo.php:5:Bar
',
'?:?:first generic error' . PHP_EOL .
'?:?:second generic error' . PHP_EOL .
'/data/folder/with space/and unicode 😃/project/folder with unicode 😃/file name with "spaces" and unicode 😃.php:2:Bar' . PHP_EOL .
'/data/folder/with space/and unicode 😃/project/folder with unicode 😃/file name with "spaces" and unicode 😃.php:4:Foo' . PHP_EOL .
'/data/folder/with space/and unicode 😃/project/foo.php:1:Foo' . PHP_EOL .
'/data/folder/with space/and unicode 😃/project/foo.php:5:Bar' . PHP_EOL,
];
}

Expand Down

0 comments on commit dcb7bc2

Please sign in to comment.