Skip to content

Commit fa08ae4

Browse files
committed
add test
1 parent 5d0bad4 commit fa08ae4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/ParserTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@
3939
$actual = (new Parser(__DIR__ . '/../tests/assets/fakeInstalled.json'))->parseAll('name');
4040
expect($actual)->toBe(['filp/whoops', 'phar-io/manifest', 'phar-io/version', 'phpstan/phpstan']);
4141
});
42+
43+
test('It return empty array if key not exist on parse all method', function () {
44+
$actual = (new Parser(__DIR__ . '/../tests/assets/fakeInstalled.json'))->parseAll('xxx.ooo.xxx');
45+
expect($actual)->toBe([]);
46+
});

0 commit comments

Comments
 (0)