Skip to content

Commit

Permalink
Remove current state test snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed May 10, 2024
1 parent 5b30a76 commit 3dddc2d
Showing 1 changed file with 1 addition and 105 deletions.
106 changes: 1 addition & 105 deletions tests/PHPStan/Parser/RichParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,70 +221,6 @@ public function dataLinesToIgnore(): iterable
3 => ['test'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore https://example.com' . PHP_EOL,
[
2 => ['https'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore identifier (comment), identifier2 (comment2)' . PHP_EOL,
[
2 => ['identifier'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore identifier (comment) (comment2)' . PHP_EOL,
[
2 => ['identifier'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore identifier (comment))' . PHP_EOL,
[
2 => ['identifier'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore identifier [comment]' . PHP_EOL,
[
2 => ['identifier'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore identifier -- comment' . PHP_EOL, // phpcs comment style
[
2 => ['identifier', 'comment'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore mečoun' . PHP_EOL,
[
2 => ['me'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore mečoun two' . PHP_EOL,
[
2 => ['me', 'two'],
],
];
}

/**
Expand All @@ -297,8 +233,8 @@ public function testLinesToIgnore(string $code, array $expectedLines): void
$parser = self::getContainer()->getService('currentPhpVersionRichParser');
$ast = $parser->parseString($code);
$lines = $ast[0]->getAttribute('linesToIgnore');
$this->assertSame($expectedLines, $lines);
$this->assertNull($ast[0]->getAttribute('linesToIgnoreParseErrors'));
$this->assertSame($expectedLines, $lines);
}

public function dataLinesToIgnoreParseErrors(): iterable
Expand Down Expand Up @@ -374,46 +310,6 @@ public function dataLinesToIgnoreParseErrors(): iterable
2 => ['Unclosed opening parenthesis "(" without closing parenthesis ")"'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore ()' . PHP_EOL,
[
2 => ['First token is not an identifier'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore ' . PHP_EOL,
[
2 => ['Missing identifier'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore ,' . PHP_EOL,
[
2 => ['First token is not an identifier'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore čumim' . PHP_EOL,
[
2 => ['First token is not an identifier'],
],
];

yield [
'<?php' . PHP_EOL .
'test(); // @phpstan-ignore test ((inner)' . PHP_EOL,
[
2 => ['Unclosed opening parenthesis "(" without closing parenthesis ")"'],
],
];
}

/**
Expand Down

0 comments on commit 3dddc2d

Please sign in to comment.