Skip to content

Commit 76c02b2

Browse files
committed
Raise code coverage 100%.
1 parent 0f1cbd4 commit 76c02b2

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

tests/StubFilesExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ public function testGetFilesReturnsStubWithEmptyArrayParamType(): void
294294
$stubContent = (string) file_get_contents($stubPath);
295295

296296
self::assertStringContainsString(
297-
"array{emptyList: array<mixed, mixed>, siteName: string, sparse: array{2: string, 5: string}, 'O\\'Reilly': string, 'C:\\\\path': string}",
297+
"array{emptyList: array<mixed, mixed>, siteName: string, sparse: array{2: string, 5: string}, 'O\\'Reilly': string, 'C:\\\\path': string, resource: mixed}",
298298
$stubContent,
299-
"Stub should infer empty array as 'array<mixed, mixed>', sparse array with explicit keys, and escape special characters in quoted keys.",
299+
"Stub should infer empty array as 'array<mixed, mixed>', sparse array with explicit keys, escape special characters in quoted keys, and fallback to 'mixed' for unsupported types.",
300300
);
301301

302302
$this->generatedStubs[] = $stubPath;

tests/config/params-empty-array-config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
'sparse' => [2 => 'a', 5 => 'b'],
1010
"O'Reilly" => 'publisher',
1111
'C:\\path' => 'windows',
12+
'resource' => fopen('php://memory', 'r'),
1213
],
1314
];

0 commit comments

Comments
 (0)