3 final class HeraldTranscriptTestCase
extends PhabricatorTestCase
{
5 public function testTranscriptTruncation() {
6 $long_string = str_repeat('x', 1024 * 1024);
7 $short_string = str_repeat('x', 4096)."\n<...>";
26 $truncated_fields = id(new HeraldObjectTranscript())
30 $this->assertEqual($short_string, $truncated_fields['ls']);
34 array_keys($truncated_fields['la']));
36 $short_string.'!<...>',
37 implode('!', $truncated_fields['la']));
41 array_keys($truncated_fields['ma']));
43 'abc!def!'.substr($short_string, 6),
44 implode('!', $truncated_fields['ma']));