Skip to content

Commit dbadc00

Browse files
committed
test(array): add tests for array keys
Refs: #456
1 parent 2a3fd2f commit dbadc00

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/src/integration/array/array.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@
2323
assert(in_array('1', $assoc));
2424
assert(in_array('2', $assoc));
2525
assert(in_array('3', $assoc));
26+
27+
$arrayKeys = test_array_keys();
28+
assert($arrayKeys[-42] === "foo");
29+
assert($arrayKeys[0] === "bar");
30+
assert($arrayKeys[5] === "baz");
31+
assert($arrayKeys[10] === "qux");
32+
assert($arrayKeys["10"] === "qux");
33+
assert($arrayKeys["quux"] === "quuux");

0 commit comments

Comments
 (0)