@@ -18,14 +18,14 @@ public function testCouldSetGetNativeMessage()
18
18
19
19
public function testColdBeSerializedToJson ()
20
20
{
21
- $ message = new GpsMessage ('theBody ' , ['thePropFoo ' => 'thePropFooVal ' ], ['theHeaderFoo ' => 'theHeaderFooVal ' ], [ ' theAttributeFoo ' => ' theAttributeFooVal ' ] );
21
+ $ message = new GpsMessage ('theBody ' , ['thePropFoo ' => 'thePropFooVal ' ], ['theHeaderFoo ' => 'theHeaderFooVal ' ]);
22
22
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 ));
24
24
}
25
25
26
26
public function testCouldBeUnserializedFromJson ()
27
27
{
28
- $ message = new GpsMessage ('theBody ' , ['thePropFoo ' => 'thePropFooVal ' ], ['theHeaderFoo ' => 'theHeaderFooVal ' ], [ ' theAttributeFoo ' => ' theAttributeFooVal ' ] );
28
+ $ message = new GpsMessage ('theBody ' , ['thePropFoo ' => 'thePropFooVal ' ], ['theHeaderFoo ' => 'theHeaderFooVal ' ]);
29
29
30
30
$ json = json_encode ($ message );
31
31
@@ -40,7 +40,7 @@ public function testCouldBeUnserializedFromJson()
40
40
41
41
public function testMessageEntityCouldBeUnserializedFromJson ()
42
42
{
43
- $ json = '{"body":"theBody","properties":{"thePropFoo":"thePropFooVal"},"headers":{"theHeaderFoo":"theHeaderFooVal"},"attributes":{"theAttributeFoo":"theAttributeFooVal"} } ' ;
43
+ $ json = '{"body":"theBody","properties":{"thePropFoo":"thePropFooVal"},"headers":{"theHeaderFoo":"theHeaderFooVal"}} ' ;
44
44
45
45
$ unserializedMessage = GpsMessage::jsonUnserialize ($ json );
46
46
@@ -49,7 +49,6 @@ public function testMessageEntityCouldBeUnserializedFromJson()
49
49
$ this ->assertEquals ($ decoded ['body ' ], $ unserializedMessage ->getBody ());
50
50
$ this ->assertEquals ($ decoded ['properties ' ], $ unserializedMessage ->getProperties ());
51
51
$ this ->assertEquals ($ decoded ['headers ' ], $ unserializedMessage ->getHeaders ());
52
- $ this ->assertEquals ($ decoded ['attributes ' ], $ unserializedMessage ->getAttributes ());
53
52
}
54
53
55
54
public function testMessagePayloadCouldBeUnserializedFromJson ()
@@ -62,7 +61,6 @@ public function testMessagePayloadCouldBeUnserializedFromJson()
62
61
$ this ->assertEquals ($ json , $ unserializedMessage ->getBody ());
63
62
$ this ->assertEquals ([], $ unserializedMessage ->getProperties ());
64
63
$ this ->assertEquals ([], $ unserializedMessage ->getHeaders ());
65
- $ this ->assertEquals ([], $ unserializedMessage ->getAttributes ());
66
64
}
67
65
68
66
public function testThrowIfMalformedJsonGivenOnUnsterilizedFromJson ()
@@ -72,13 +70,4 @@ public function testThrowIfMalformedJsonGivenOnUnsterilizedFromJson()
72
70
73
71
GpsMessage::jsonUnserialize ('{] ' );
74
72
}
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
- }
84
73
}
0 commit comments