Page MenuHomePhorge

LiskChunkTestCase.php
No OneTemporary

LiskChunkTestCase.php

<?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));
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Mar 26, 23:55 (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1143377
Default Alt Text
LiskChunkTestCase.php (929 B)

Event Timeline