@@ -45,7 +45,7 @@ public function testShouldCollectInfoIfStringGivenAsEventMessage()
4545
4646 $ producer ->sendEvent ('aFooTopic ' , 'aFooBody ' );
4747
48- $ this ->assertSame ([
48+ $ this ->assertArraySubset ([
4949 [
5050 'topic ' => 'aFooTopic ' ,
5151 'command ' => null ,
@@ -60,6 +60,8 @@ public function testShouldCollectInfoIfStringGivenAsEventMessage()
6060 'messageId ' => null ,
6161 ],
6262 ], $ producer ->getTraces ());
63+
64+ $ this ->assertArrayHasKey ('sentAt ' , $ producer ->getTraces ()[0 ]);
6365 }
6466
6567 public function testShouldCollectInfoIfArrayGivenAsEventMessage ()
@@ -68,7 +70,7 @@ public function testShouldCollectInfoIfArrayGivenAsEventMessage()
6870
6971 $ producer ->sendEvent ('aFooTopic ' , ['foo ' => 'fooVal ' , 'bar ' => 'barVal ' ]);
7072
71- $ this ->assertSame ([
73+ $ this ->assertArraySubset ([
7274 [
7375 'topic ' => 'aFooTopic ' ,
7476 'command ' => null ,
@@ -83,6 +85,8 @@ public function testShouldCollectInfoIfArrayGivenAsEventMessage()
8385 'messageId ' => null ,
8486 ],
8587 ], $ producer ->getTraces ());
88+
89+ $ this ->assertArrayHasKey ('sentAt ' , $ producer ->getTraces ()[0 ]);
8690 }
8791
8892 public function testShouldCollectInfoIfEventMessageObjectGivenAsMessage ()
@@ -102,7 +106,7 @@ public function testShouldCollectInfoIfEventMessageObjectGivenAsMessage()
102106
103107 $ producer ->sendEvent ('aFooTopic ' , $ message );
104108
105- $ this ->assertSame ([
109+ $ this ->assertArraySubset ([
106110 [
107111 'topic ' => 'aFooTopic ' ,
108112 'command ' => null ,
@@ -117,6 +121,8 @@ public function testShouldCollectInfoIfEventMessageObjectGivenAsMessage()
117121 'messageId ' => 'theMessageId ' ,
118122 ],
119123 ], $ producer ->getTraces ());
124+
125+ $ this ->assertArrayHasKey ('sentAt ' , $ producer ->getTraces ()[0 ]);
120126 }
121127
122128 public function testShouldNotStoreAnythingIfInternalEventMessageProducerThrowsException ()
@@ -162,7 +168,7 @@ public function testShouldCollectInfoIfStringGivenAsCommandMessage()
162168
163169 $ producer ->sendCommand ('aFooCommand ' , 'aFooBody ' );
164170
165- $ this ->assertSame ([
171+ $ this ->assertArraySubset ([
166172 [
167173 'topic ' => null ,
168174 'command ' => 'aFooCommand ' ,
@@ -177,6 +183,8 @@ public function testShouldCollectInfoIfStringGivenAsCommandMessage()
177183 'messageId ' => null ,
178184 ],
179185 ], $ producer ->getTraces ());
186+
187+ $ this ->assertArrayHasKey ('sentAt ' , $ producer ->getTraces ()[0 ]);
180188 }
181189
182190 public function testShouldCollectInfoIfArrayGivenAsCommandMessage ()
@@ -185,7 +193,7 @@ public function testShouldCollectInfoIfArrayGivenAsCommandMessage()
185193
186194 $ producer ->sendCommand ('aFooCommand ' , ['foo ' => 'fooVal ' , 'bar ' => 'barVal ' ]);
187195
188- $ this ->assertSame ([
196+ $ this ->assertArraySubset ([
189197 [
190198 'topic ' => null ,
191199 'command ' => 'aFooCommand ' ,
@@ -200,6 +208,8 @@ public function testShouldCollectInfoIfArrayGivenAsCommandMessage()
200208 'messageId ' => null ,
201209 ],
202210 ], $ producer ->getTraces ());
211+
212+ $ this ->assertArrayHasKey ('sentAt ' , $ producer ->getTraces ()[0 ]);
203213 }
204214
205215 public function testShouldCollectInfoIfCommandMessageObjectGivenAsMessage ()
@@ -219,7 +229,7 @@ public function testShouldCollectInfoIfCommandMessageObjectGivenAsMessage()
219229
220230 $ producer ->sendCommand ('aFooCommand ' , $ message );
221231
222- $ this ->assertSame ([
232+ $ this ->assertArraySubset ([
223233 [
224234 'topic ' => null ,
225235 'command ' => 'aFooCommand ' ,
@@ -234,6 +244,8 @@ public function testShouldCollectInfoIfCommandMessageObjectGivenAsMessage()
234244 'messageId ' => 'theMessageId ' ,
235245 ],
236246 ], $ producer ->getTraces ());
247+
248+ $ this ->assertArrayHasKey ('sentAt ' , $ producer ->getTraces ()[0 ]);
237249 }
238250
239251 public function testShouldNotStoreAnythingIfInternalCommandMessageProducerThrowsException ()
0 commit comments