File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+
3+ namespace PHPStan \PhpDoc ;
4+
5+ use PHPStan \PhpDocParser \Parser \ParserException ;
6+ use PHPStan \Testing \PHPStanTestCase ;
7+
8+ class PhpDocStringResolverTest extends PHPStanTestCase
9+ {
10+
11+ public function testConsumeEnd (): void
12+ {
13+ $ phpDocStringResolver = self ::getContainer ()->getByType (PhpDocStringResolver::class);
14+
15+ $ this ->expectException (ParserException::class);
16+ $ this ->expectExceptionMessage ('Unexpected token "test", expected TOKEN_END at offset 25 on line 1 ' );
17+ $ phpDocStringResolver ->resolve ('/** @param int $test */ test ' );
18+ }
19+
20+ }
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+
3+ namespace PHPStan \PhpDoc ;
4+
5+ use PHPStan \PhpDocParser \Parser \ParserException ;
6+ use PHPStan \Testing \PHPStanTestCase ;
7+
8+ class TypeStringResolverTest extends PHPStanTestCase
9+ {
10+
11+ public function testConsumeEnd (): void
12+ {
13+ $ typeStringResolver = self ::getContainer ()->getByType (TypeStringResolver::class);
14+
15+ $ this ->expectException (ParserException::class);
16+ $ this ->expectExceptionMessage ('Unexpected token "int", expected TOKEN_END at offset 7 on line 1 ' );
17+ $ typeStringResolver ->resolve ('string int ' );
18+ }
19+
20+ }
You can’t perform that action at this time.
0 commit comments