Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80729825
LiskChunkTestCase.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, Sep 2, 07:35
Size
928 B
Mime Type
text/x-php
Expires
Wed, Sep 4, 07:35 (2 d)
Engine
blob
Format
Raw Data
Handle
20433619
Attached To
rPH Phabricator
LiskChunkTestCase.php
View Options
<?php
final
class
LiskChunkTestCase
extends
PhabricatorTestCase
{
public
function
testSQLChunking
()
{
$fragments
=
array
(
'a'
,
'a'
,
'b'
,
'b'
,
'ccc'
,
'dd'
,
'e'
,
);
$this
->
assertEqual
(
array
(
'aa'
,
'bb'
,
'ccc'
,
'dd'
,
'e'
,
),
PhabricatorLiskDAO
::
chunkSQL
(
$fragments
,
''
,
2
));
$fragments
=
array
(
'a'
,
'a'
,
'a'
,
'XX'
,
'a'
,
'a'
,
'a'
,
'a'
);
$this
->
assertEqual
(
array
(
'a, a, a'
,
'XX, a, a'
,
'a, a'
,
),
PhabricatorLiskDAO
::
chunkSQL
(
$fragments
,
', '
,
8
));
$fragments
=
array
(
'xxxxxxxxxx'
,
'yyyyyyyyyy'
,
'a'
,
'b'
,
'c'
,
'zzzzzzzzzz'
,
);
$this
->
assertEqual
(
array
(
'xxxxxxxxxx'
,
'yyyyyyyyyy'
,
'a, b, c'
,
'zzzzzzzzzz'
,
),
PhabricatorLiskDAO
::
chunkSQL
(
$fragments
,
', '
,
8
));
}
}
Event Timeline
Log In to Comment