Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92963062
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
Mon, Nov 25, 04:48
Size
584 B
Mime Type
text/x-php
Expires
Wed, Nov 27, 04:48 (2 d)
Engine
blob
Format
Raw Data
Handle
22545909
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