-
-
Notifications
You must be signed in to change notification settings - Fork 6
Fix CI pipeline: phpunit.xml validation warning, php-parser v4 test skip, and comprehensive type-analysis regression coverage #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
cdeace8
1fae5be
f4f4072
d48c560
d22f7dd
5180aa4
6bc14a7
75671f9
1d1d4fa
9d4fe95
5c3e936
e466f5f
d034f80
35bf8b8
3833dc7
37b9ace
f315024
6fed600
72f1c78
8f45db2
d5eb4ca
cfd4ad0
d01b6b8
8b03fb1
9433ca1
e95fe6f
29aa9bd
00ed1ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -232,6 +232,23 @@ public function testSimpleOneClassWithTrait(): void | |
| ); | ||
| } | ||
|
|
||
| public function testBrokenParamPhpDocRawIsPreserved(): void | ||
| { | ||
| if (PHP_VERSION_ID < 80000) { | ||
| static::markTestSkipped('only for PHP >= 8.0'); | ||
| } | ||
|
|
||
| $phpCode = PhpCodeParser::getPhpFiles(__DIR__ . '/Dummy8.php'); | ||
| $phpClasses = $phpCode->getClasses(); | ||
|
|
||
| static::assertSame( | ||
| 'array{stdClass: \stdClass, numbers: int|float $lall <foo/>', | ||
| $phpClasses[Dummy8::class]->methods['foo_broken']->parameters['lall']->phpDocRaw | ||
| ); | ||
|
|
||
| static::assertNull($phpClasses[Dummy8::class]->methods['foo_broken']->parameters['lall']->typeFromPhpDocExtended); | ||
| } | ||
|
Comment on lines
+221
to
+353
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test method Duplicate test logic increases maintenance overhead without providing additional coverage. If the goal is to have a focused test for this regression, consider moving the assertions from |
||
|
|
||
| public function testSimpleOneTrait(): void | ||
| { | ||
| $phpCode = PhpCodeParser::getPhpFiles(__DIR__ . '/DummyTrait.php'); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test duplicates assertions already present in
testSimpleOneClassWithTrait()forDummy8::foo_broken()(seetests/ParserTest.phparound the existingphpDocRaw/typeFromPhpDocExtendedchecks). To reduce duplication/maintenance, consider either (a) moving those assertions out oftestSimpleOneClassWithTrait()into this focused test and removing the originals, or (b) extracting a small helper that returns the parsedDummy8class so both tests don’t need to re-parseDummy8.php.