| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920 | 
							- <?php
 
- require_once('test_util.php');
 
- use Google\Protobuf\Internal\RepeatedField;
 
- use Google\Protobuf\Internal\GPBType;
 
- use Foo\TestMessage;
 
- use Foo\TestMessage_Sub;
 
- class UndefinedTest extends PHPUnit_Framework_TestCase
 
- {
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt32AppendStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT32);
 
-         $arr[] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt32SetStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT32);
 
-         $arr[] = 0;
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt32AppendMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT32);
 
-         $arr[] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt32SetMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT32);
 
-         $arr[] = 0;
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint32AppendStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::UINT32);
 
-         $arr[] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint32SetStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::UINT32);
 
-         $arr[] = 0;
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint32AppendMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::UINT32);
 
-         $arr[] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint32SetMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::UINT32);
 
-         $arr[] = 0;
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt64AppendStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT64);
 
-         $arr[] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt64SetStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT64);
 
-         $arr[] = 0;
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt64AppendMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT64);
 
-         $arr[] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt64SetMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT64);
 
-         $arr[] = 0;
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint64AppendStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::UINT64);
 
-         $arr[] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint64SetStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::UINT64);
 
-         $arr[] = 0;
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint64AppendMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::UINT64);
 
-         $arr[] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint64SetMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::UINT64);
 
-         $arr[] = 0;
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testFloatAppendStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::FLOAT);
 
-         $arr[] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testFloatSetStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::FLOAT);
 
-         $arr[] = 0.0;
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testFloatAppendMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::FLOAT);
 
-         $arr[] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testFloatSetMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::FLOAT);
 
-         $arr[] = 0.0;
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testDoubleAppendStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::DOUBLE);
 
-         $arr[] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testDoubleSetStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::DOUBLE);
 
-         $arr[] = 0.0;
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testDoubleAppendMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::DOUBLE);
 
-         $arr[] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testDoubleSetMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::DOUBLE);
 
-         $arr[] = 0.0;
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testBoolAppendMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::BOOL);
 
-         $arr[] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testBoolSetMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::BOOL);
 
-         $arr[] = true;
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testStringAppendMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::STRING);
 
-         $arr[] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testStringSetMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::STRING);
 
-         $arr[] = 'abc';
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testStringAppendInvalidUTF8Fail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::STRING);
 
-         $hex = hex2bin("ff");
 
-         $arr[] = $hex;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testStringSetInvalidUTF8Fail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::STRING);
 
-         $arr[] = 'abc';
 
-         $hex = hex2bin("ff");
 
-         $arr[0] = $hex;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageAppendIntFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::MESSAGE, TestMessage_Sub::class);
 
-         $arr[] = 1;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageSetIntFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::MESSAGE, TestMessage_Sub::class);
 
-         $arr[] = new TestMessage_Sub;
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageAppendStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::MESSAGE, TestMessage_Sub::class);
 
-         $arr[] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageSetStringFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::MESSAGE, TestMessage_Sub::class);
 
-         $arr[] = new TestMessage_Sub;
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageAppendOtherMessageFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::MESSAGE, TestMessage_Sub::class);
 
-         $arr[] = new TestMessage;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageAppendNullFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::MESSAGE, TestMessage_Sub::class);
 
-         $null = null;
 
-         $arr[] = $null;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageSetNullFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::MESSAGE, TestMessage_Sub::class);
 
-         $arr[] = new TestMessage_Sub();
 
-         $null = null;
 
-         $arr[0] = $null;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testRemoveMiddleFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT32);
 
-         $arr[] = 0;
 
-         $arr[] = 1;
 
-         $arr[] = 2;
 
-         $this->assertSame(3, count($arr));
 
-         unset($arr[1]);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testRemoveEmptyFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT32);
 
-         unset($arr[0]);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageOffsetFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT32);
 
-         $arr[] = 0;
 
-         $arr[new TestMessage_Sub()] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testStringOffsetFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT32);
 
-         $arr[] = 0;
 
-         $arr['abc'] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testSetNonExistedOffsetFail()
 
-     {
 
-         $arr = new RepeatedField(GPBType::INT32);
 
-         $arr[0] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt32FieldInvalidTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalInt32(new TestMessage());
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt32FieldInvalidStringFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalInt32('abc');
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint32FieldInvalidTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalUint32(new TestMessage());
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint32FieldInvalidStringFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalUint32('abc');
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt64FieldInvalidTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalInt64(new TestMessage());
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt64FieldInvalidStringFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalInt64('abc');
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint64FieldInvalidTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalUint64(new TestMessage());
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint64FieldInvalidStringFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalUint64('abc');
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testFloatFieldInvalidTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalFloat(new TestMessage());
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testFloatFieldInvalidStringFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalFloat('abc');
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testDoubleFieldInvalidTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalDouble(new TestMessage());
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testDoubleFieldInvalidStringFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalDouble('abc');
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testBoolFieldInvalidStringFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalBool(new TestMessage());
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testStringFieldInvalidUTF8Fail()
 
-     {
 
-         $m = new TestMessage();
 
-         $hex = hex2bin("ff");
 
-         $m->setOptionalString($hex);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageFieldWrongTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $a = 1;
 
-         $m->setOptionalMessage($a);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageFieldWrongClassFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setOptionalMessage(new TestMessage());
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testRepeatedFieldWrongTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $a = 1;
 
-         $m->setRepeatedInt32($a);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testRepeatedFieldWrongObjectFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setRepeatedInt32($m);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testRepeatedFieldWrongRepeatedTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $repeated_int32 = new RepeatedField(GPBType::UINT32);
 
-         $m->setRepeatedInt32($repeated_int32);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testRepeatedFieldWrongRepeatedMessageClassFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $repeated_message = new RepeatedField(GPBType::MESSAGE,
 
-                                               TestMessage::class);
 
-         $m->setRepeatedMessage($repeated_message);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMapFieldWrongTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $a = 1;
 
-         $m->setMapInt32Int32($a);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMapFieldWrongObjectFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $m->setMapInt32Int32($m);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMapFieldWrongRepeatedTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $map_uint32_uint32 = new MapField(GPBType::UINT32, GPBType::UINT32);
 
-         $m->setMapInt32Int32($map_uint32_uint32);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMapFieldWrongRepeatedMessageClassFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $map_int32_message = new MapField(GPBType::INT32,
 
-                                           GPBType::MESSAGE,
 
-                                           TestMessage::class);
 
-         $m->setMapInt32Message($map_int32_message);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageMergeFromInvalidTypeFail()
 
-     {
 
-         $m = new TestMessage();
 
-         $n = new TestMessage_Sub();
 
-         $m->mergeFrom($n);
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt32SetStringKeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::INT32, GPBType::INT32);
 
-         $arr['abc'] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt32SetStringValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::INT32, GPBType::INT32);
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt32SetMessageKeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::INT32, GPBType::INT32);
 
-         $arr[new TestMessage_Sub()] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt32SetMessageValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::INT32, GPBType::INT32);
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint32SetStringKeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::UINT32, GPBType::UINT32);
 
-         $arr['abc'] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint32SetStringValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::UINT32, GPBType::UINT32);
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint32SetMessageKeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::UINT32, GPBType::UINT32);
 
-         $arr[new TestMessage_Sub()] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint32SetMessageValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::UINT32, GPBType::UINT32);
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt64SetStringKeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::INT64, GPBType::INT64);
 
-         $arr['abc'] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt64SetStringValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::INT64, GPBType::INT64);
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt64SetMessageKeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::INT64, GPBType::INT64);
 
-         $arr[new TestMessage_Sub()] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testInt64SetMessageValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::INT64, GPBType::INT64);
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint64SetStringKeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::UINT64, GPBType::UINT64);
 
-         $arr['abc'] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint64SetStringValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::UINT64, GPBType::UINT64);
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint64SetMessageKeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::UINT64, GPBType::UINT64);
 
-         $arr[new TestMessage_Sub()] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testUint64SetMessageValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::UINT64, GPBType::UINT64);
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testDoubleSetStringValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::INT64, GPBType::DOUBLE);
 
-         $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testDoubleSetMessageValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::INT64, GPBType::DOUBLE);
 
-         $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testBoolSetMessageKeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::BOOL, GPBType::BOOL);
 
-         $arr[new TestMessage_Sub()] = true;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testBoolSetMessageValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::BOOL, GPBType::BOOL);
 
-         $arr[true] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testStringSetInvalidUTF8KeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::STRING, GPBType::STRING);
 
-         $arr[hex2bin("ff")] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testStringSetInvalidUTF8ValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::STRING, GPBType::STRING);
 
-         $arr['abc'] = hex2bin("ff");
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testStringSetMessageKeyFail()
 
-     {
 
-         $arr = new MapField(GPBType::STRING, GPBType::STRING);
 
-         $arr[new TestMessage_Sub()] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testStringSetMessageValueFail()
 
-     {
 
-         $arr = new MapField(GPBType::STRING, GPBType::STRING);
 
-         $arr['abc'] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageSetIntValueFail()
 
-     {
 
-        $arr =
 
-            new MapField(GPBType::INT32, GPBType::MESSAGE, TestMessage::class);
 
-        $arr[0] = 0;
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageSetStringValueFail()
 
-     {
 
-        $arr =
 
-            new MapField(GPBType::INT32, GPBType::MESSAGE, TestMessage::class);
 
-        $arr[0] = 'abc';
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageSetOtherMessageValueFail()
 
-     {
 
-        $arr =
 
-            new MapField(GPBType::INT32, GPBType::MESSAGE, TestMessage::class);
 
-        $arr[0] = new TestMessage_Sub();
 
-     }
 
-     /**
 
-      * @expectedException PHPUnit_Framework_Error
 
-      */
 
-     public function testMessageSetNullFail()
 
-     {
 
-        $arr =
 
-            new MapField(GPBType::INT32, GPBType::MESSAGE, TestMessage::class);
 
-        $null = NULL;
 
-        $arr[0] = $null;
 
-     }
 
- }
 
 
  |