Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3281828
PhutilChunkedIteratorTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
584 B
Referenced Files
None
Subscribers
None
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
)
;
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Mar 24, 01:53 (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1119106
Default Alt Text
PhutilChunkedIteratorTestCase.php (584 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment