Skip to content

Commit

Permalink
Add a test for SplFileObject::fstat().
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Feb 4, 2022
1 parent 7215835 commit 0ae39b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/PHPStan/Analyser/LegacyNodeScopeResolverTest.php
Expand Up @@ -5562,6 +5562,10 @@ public function dataFunctions(): array
'array{0: int, 1: int, 2: int, 3: int, 4: int, 5: int, 6: int, 7: int, 8: int, 9: int, 10: int, 11: int, 12: int, dev: int, ino: int, mode: int, nlink: int, uid: int, gid: int, rdev: int, size: int, atime: int, mtime: int, ctime: int, blksize: int, blocks: int}|false',
'$fstat',
],
[
'array{0: int, 1: int, 2: int, 3: int, 4: int, 5: int, 6: int, 7: int, 8: int, 9: int, 10: int, 11: int, 12: int, dev: int, ino: int, mode: int, nlink: int, uid: int, gid: int, rdev: int, size: int, atime: int, mtime: int, ctime: int, blksize: int, blocks: int}',
'$fileObjectStat',
],
[
'string',
'$base64DecodeWithoutStrict',
Expand Down
2 changes: 2 additions & 0 deletions tests/PHPStan/Analyser/data/functions.php
Expand Up @@ -101,6 +101,8 @@
$stat = stat(__FILE__);
$lstat = lstat(__FILE__);
$fstat = fstat($resource);
$fileObject = new \SplFileObject(__FILE__);
$fileObjectStat = $fileObject->fstat();

$base64DecodeWithoutStrict = base64_decode('');
$base64DecodeWithStrictDisabled = base64_decode('', false);
Expand Down

0 comments on commit 0ae39b5

Please sign in to comment.