test data for the Amfphp unit tests data types have the s prefix for 'serialized' and 'd' prefix for 'deserialized' for Packets there is a flaw in the Amfphp design which means that serializng and deserializing is not symmetrical.
so use s for serialized, d for deserialized for the serialization tests and dd for the deserialation tests, the idea being that dd will disappear for v2
Located in /Tests/TestData/AmfTestData.php (line 21)
an Amfphp_Core_Amf_Packet with two headers one with a string and one with a null , and two Messages, one with a string and one with a null
byte
double: 8 bytes. Careful of little/big endian so that test runs with both systems
the writeArray method looks at the keys. If there are both numeric and string keys, the data is treated as an Ecma Array
it also sorts the data and writes the data with numerical keys first, then the data with string keys
test serializing an empty Amfphp_Core_Amf_Packet.
expected output: 0x000000 1st int : version 2nd int : number of headers 3rd int : number of Messages
int: 2 bytes
long: 4 bytes
long utf: the length of the data on 4 bytes and then the char data. The char data is more than 65xxx long
one header containing a null, and with required set to true
no headers and a Message containing a null
number: type is0, then value in (double)8 bytes. See buildDouble for little/big endian
TODO test with a real reference?
with one header containing a string
no headers and a Message containing a string
note: the writeXml method gets rids of CRs and LFs
TODO: no writeUnsupported method, and no PHP for unsupported. Write it A.S.
utf: the length of the data on 2 bytes and then the char data
note: the writeXml method gets rids of CRs and LFs
Documentation generated on Mon, 23 Jan 2012 17:22:03 -0300 by phpDocumentor 1.4.3