Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121659275
PhutilChunkedIteratorTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jul 12, 22:03
Size
584 B
Mime Type
text/x-php
Expires
Mon, Jul 14, 22:03 (2 d)
Engine
blob
Format
Raw Data
Handle
27369080
Attached To
rPHU libphutil
PhutilChunkedIteratorTestCase.php
View Options
<?php
/**
* Test cases for @{class:PhutilChunkedIterator}.
*/
final
class
PhutilChunkedIteratorTestCase
extends
PhutilTestCase
{
public
function
testChunkedIterator
()
{
$expect
=
array
(
array
(
0
=>
1
,
1
=>
3
),
array
(
2
=>
5
),
);
$iterator
=
new
PhutilChunkedIterator
(
new
ArrayIterator
(
array
(
1
,
3
,
5
)),
2
);
$this
->
assertEqual
(
$expect
,
iterator_to_array
(
$iterator
));
for
(
$i
=
0
;
$i
<
2
;
$i
++)
{
foreach
(
$iterator
as
$key
=>
$actual
)
{
$this
->
assertEqual
(
idx
(
$expect
,
$key
),
$actual
);
}
}
}
}
Event Timeline
Log In to Comment