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

package | Tests_TestData
author | Ariel Sommeria-klein

### Methods

## constructor

    __construct()

## 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

    build2HeadersAndTwoMessagesPacket()

## build boolean

    buildBoolean()

## byte

    buildByte()

## build date

    buildDate()

## double: 8 bytes.

    buildDouble()

Careful of little/big endian so that test runs with both systems

## the writeArray method looks at the keys.

    buildEcmaArray()

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.

    buildEmptyPacket()

expected output: 0x000000 1st int : version 2nd int : number of headers 3rd int : number of Messages

## int: 2 bytes

    buildInt()

## long: 4 bytes

    buildLong()

## build long string

    buildLongString()

## long utf: the length of the data on 4 bytes and then the char data.

    buildLongUtf()

The char data is more than 65xxx long

## build null

    buildNull()

## one header containing a null, and with required set to true

    buildNullHeaderPacket()

## no headers and a Message containing a null

    buildNullMessagePacket()

## number: type is0, then value in (double)8 bytes.

    buildNumber()

See buildDouble for little/big endian

## build object

    buildObject()

## build object end

    buildObjectEnd()

## TODO test with a real reference?

    buildReference()

## build simple test service reauest and response

    buildSimpleTestServiceRequestAndResponse()

## build strict array

    buildStrictArray()

## build string

    buildString()

## with one header containing a string

    buildStringHeaderPacket()

## no headers and a Message containing a string

    buildStringMessagePacket()

## note: the writeXml method gets rids of CRs and LFs

    buildTypedObject()

## build undefined

    buildUndefined()

## TODO: no writeUnsupported method, and no PHP for unsupported.

    buildUnsupported()

Write it A.S.

## utf: the length of the data on 2 bytes and then the char data

    buildUtf()

## note: the writeXml method gets rids of CRs and LFs

    buildXml()

### Properties

##

    $d2Headers2MessagesPacket : \Amfphp_Core_Amf_Packet

##

    $dBoolean : boolean

##

    $dByte : int

##

    $dDate : \Amfphp_Core_Amf_Types_Date

##

    $dDouble : float

##

    $dEcmaArray : array

##

    $dEmptyPacket : \Amfphp_Core_Amf_Packet

##

    $dInt : int

##

    $dLong : int

##

    $dLongString : string

##

    $dLongUtf : string

##

    $dNull : null

##

    $dNullHeaderPacket : \Amfphp_Core_Amf_Packet

##

    $dNullMessagePacket : \Amfphp_Core_Amf_Packet

##

    $dNumber : float

##

    $dObject : \stdClass

##

    $dObjectEnd : null

##

    $dReference : \stdClass

##

    $dStrictArray : array

##

    $dString : string

##

    $dStringHeaderPacket : \Amfphp_Core_Amf_Packet

##

    $dStringMessagePacket : \Amfphp_Core_Amf_Packet

##

    $dTypedObject : \DummyClass

##

    $dUndefined : \Amfphp_Core_Amf_Types_Undefined

##

    $dUnsupported : string

##

    $dUtf :

##

    $dXml : \Amfphp_Core_Amf_Types_Xml

##

    $s2Headers2MessagesPacket : string

##

    $sBoolean : string

##

    $sByte : string

##

    $sDate : string

##

    $sDouble : string

##

    $sEcmaArray : string

##

    $sEmptyPacket : string

##

    $sInt : string

##

    $sLong : string

##

    $sLongString : string

##

    $sLongUtf : string

##

    $sNull : string

##

    $sNullHeaderPacket : string

##

    $sNullMessagePacket : string

##

    $sNumber : string

##

    $sObject : string

##

    $sObjectEnd : string

##

    $sReference : string

##

    $sStrictArray : string

##

    $sString : string

##

    $sStringHeaderPacket : string

##

    $sStringMessagePacket : string

##

    $sTypedObject : string

##

    $sUndefined : string

##

    $sUnsupported : string

##

    $sUtf : string

##

    $sXml : string

##

    $testServiceRequestPacket : \Amfphp_Core_Amf_Packet

##

    $testServiceResponsePacket : \Amfphp_Core_Amf_Packet