Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F123597490
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, Jul 28, 14:32
Size
592 B
Mime Type
text/x-php
Expires
Wed, Jul 30, 14:32 (2 d)
Engine
blob
Format
Raw Data
Handle
27696965
Attached To
rPHU libphutil
PhutilChunkedIteratorTestCase.php
View Options
<?php
/**
* Test cases for functions in utils.php.
*
* @group testcase
*/
final
class
PhutilChunkedIteratorTestCase
extends
PhutilTestCase
{
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