1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-02-09 13:28:28 +01:00
phorge-arcanist/src/conduit/__tests__/ConduitClientTestCase.php
epriestley 9b74cb4ee6 Fully merge "libphutil/" into "arcanist/"
Summary: Ref T13395. Moves all remaining code in "libphutil/" into "arcanist/".

Test Plan: Ran various arc workflows, although this probably has some remaining rough edges.

Maniphest Tasks: T13395

Differential Revision: https://secure.phabricator.com/D20980
2020-02-12 15:17:38 -08:00

34 lines
690 B
PHP

<?php
final class ConduitClientTestCase extends PhutilTestCase {
public function testConduitRequestEncoding() {
$input = array(
'z' => array(
'nothing' => null,
'emptystring' => '',
),
'empty' => array(
),
'list' => array(
15,
'quack',
true,
false,
),
'a' => array(
'key' => 'value',
'key2' => 'value2',
),
);
$expect =
'O4:S1:aO2:S3:keyS5:valueS4:key2S6:value2S5:emptyA0:S4:listA4:I2:15'.
'S5:quackB1:B0:S1:zO2:S11:emptystringS0:S7:nothingN:';
$this->assertEqual(
$expect,
ConduitClient::encodeRawDataForSignature($input));
}
}