Skip to content

Commit 2fcf53f

Browse files
staabmondrejmirtes
authored andcommitted
Added regression test
1 parent a38f0f1 commit 2fcf53f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/PHPStan/Analyser/NodeScopeResolverTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,7 @@ public function dataFileAsserts(): iterable
14011401
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-7291.php');
14021402
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-10264.php');
14031403
yield from $this->gatherAssertTypes(__DIR__ . '/data/conditional-vars.php');
1404+
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-5961.php');
14041405
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-10189.php');
14051406
}
14061407

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Bug5961;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
function doFoo() {
8+
assertType('"Foo \r\n Bar"', "Foo \r\n Bar");
9+
assertType('"Foo \n Bar"', "Foo \n Bar");
10+
assertType('"Foo \r Bar"', "Foo \r Bar");
11+
}

0 commit comments

Comments
 (0)