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/021-to-pairs.phpt

15 lines
307 B
Plaintext
Raw Normal View History

2018-04-20 12:59:21 +00:00
--TEST--
Test Collection::toPairs().
--FILE--
<?php
$pairs = Collection::init(['a' => 'b', 'c' => 'd'])->toPairs();
$test = '';
2018-08-28 14:11:09 +00:00
foreach ($pairs as $pair) {
2018-04-20 12:59:21 +00:00
$test .= $pair->first . ',' . $pair->second . ';';
2018-08-28 14:11:09 +00:00
}
if ($test != 'a,b;c,d;') {
2018-04-20 12:59:21 +00:00
echo 'Collection::toPairs() failed.', PHP_EOL;
2018-08-28 14:11:09 +00:00
}
2018-04-20 12:59:21 +00:00
?>
--EXPECT--