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.
2018-04-22 14:47:30 +00:00
|
|
|
--TEST--
|
|
|
|
Test Collection::flatten().
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$array = [['a', 'foo' => 'b'], ['c', 'd', ['e']], 'bar' => 'f'];
|
|
|
|
$collection = Collection::init($array)->flatten();
|
2018-08-28 14:11:09 +00:00
|
|
|
if ($collection->toArray() != ['a', 'foo' => 'b', 'c', 'd', ['e'], 'bar' => 'f']) {
|
2018-04-22 14:47:30 +00:00
|
|
|
echo 'Collection::flatten() failed.', PHP_EOL;
|
2018-08-28 14:11:09 +00:00
|
|
|
}
|
2018-04-22 14:47:30 +00:00
|
|
|
?>
|
|
|
|
--EXPECT--
|