@@ -18,14 +18,14 @@ public function testCouldSetGetNativeMessage()
1818
1919 public function testColdBeSerializedToJson ()
2020 {
21- $ message = new GpsMessage ('theBody ' , ['thePropFoo ' => 'thePropFooVal ' ], ['theHeaderFoo ' => 'theHeaderFooVal ' ], [ ' theAttributeFoo ' => ' theAttributeFooVal ' ] );
21+ $ message = new GpsMessage ('theBody ' , ['thePropFoo ' => 'thePropFooVal ' ], ['theHeaderFoo ' => 'theHeaderFooVal ' ]);
2222
23- $ this ->assertEquals ('{"body":"theBody","properties":{"thePropFoo":"thePropFooVal"},"headers":{"theHeaderFoo":"theHeaderFooVal"},"attributes":{"theAttributeFoo":"theAttributeFooVal"} } ' , json_encode ($ message ));
23+ $ this ->assertEquals ('{"body":"theBody","properties":{"thePropFoo":"thePropFooVal"},"headers":{"theHeaderFoo":"theHeaderFooVal"}} ' , json_encode ($ message ));
2424 }
2525
2626 public function testCouldBeUnserializedFromJson ()
2727 {
28- $ message = new GpsMessage ('theBody ' , ['thePropFoo ' => 'thePropFooVal ' ], ['theHeaderFoo ' => 'theHeaderFooVal ' ], [ ' theAttributeFoo ' => ' theAttributeFooVal ' ] );
28+ $ message = new GpsMessage ('theBody ' , ['thePropFoo ' => 'thePropFooVal ' ], ['theHeaderFoo ' => 'theHeaderFooVal ' ]);
2929
3030 $ json = json_encode ($ message );
3131
@@ -40,7 +40,7 @@ public function testCouldBeUnserializedFromJson()
4040
4141 public function testMessageEntityCouldBeUnserializedFromJson ()
4242 {
43- $ json = '{"body":"theBody","properties":{"thePropFoo":"thePropFooVal"},"headers":{"theHeaderFoo":"theHeaderFooVal"},"attributes":{"theAttributeFoo":"theAttributeFooVal"} } ' ;
43+ $ json = '{"body":"theBody","properties":{"thePropFoo":"thePropFooVal"},"headers":{"theHeaderFoo":"theHeaderFooVal"}} ' ;
4444
4545 $ unserializedMessage = GpsMessage::jsonUnserialize ($ json );
4646
@@ -49,7 +49,6 @@ public function testMessageEntityCouldBeUnserializedFromJson()
4949 $ this ->assertEquals ($ decoded ['body ' ], $ unserializedMessage ->getBody ());
5050 $ this ->assertEquals ($ decoded ['properties ' ], $ unserializedMessage ->getProperties ());
5151 $ this ->assertEquals ($ decoded ['headers ' ], $ unserializedMessage ->getHeaders ());
52- $ this ->assertEquals ($ decoded ['attributes ' ], $ unserializedMessage ->getAttributes ());
5352 }
5453
5554 public function testMessagePayloadCouldBeUnserializedFromJson ()
@@ -62,7 +61,6 @@ public function testMessagePayloadCouldBeUnserializedFromJson()
6261 $ this ->assertEquals ($ json , $ unserializedMessage ->getBody ());
6362 $ this ->assertEquals ([], $ unserializedMessage ->getProperties ());
6463 $ this ->assertEquals ([], $ unserializedMessage ->getHeaders ());
65- $ this ->assertEquals ([], $ unserializedMessage ->getAttributes ());
6664 }
6765
6866 public function testThrowIfMalformedJsonGivenOnUnsterilizedFromJson ()
@@ -72,13 +70,4 @@ public function testThrowIfMalformedJsonGivenOnUnsterilizedFromJson()
7270
7371 GpsMessage::jsonUnserialize ('{] ' );
7472 }
75-
76- public function testGetAttributes ()
77- {
78- $ message = new GpsMessage ('the body ' , [], [], ['key1 ' => 'value1 ' ]);
79-
80- $ attributes = $ message ->getAttributes ();
81-
82- $ this ->assertSame (['key1 ' => 'value1 ' ], $ attributes );
83- }
8473}
0 commit comments