This repository has been archived on 2020-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
ext-collections/tests/024-keys-values.phpt

15 lines
402 B
PHP

--TEST--
Test Collection::keys() and Collection::values().
--FILE--
<?php
$array = ['a' => 'b', 'c' => ['d'], 10 => 'f'];
$collection = Collection::init($array);
if ($collection->keys()->toArray() != array_keys($array)) {
echo 'Collection::keys() failed.', PHP_EOL;
}
if ($collection->values()->toArray() != array_values($array)) {
echo 'Collection::values() failed.', PHP_EOL;
}
?>
--EXPECT--