Commit 224033e0 authored by Jeremy Mikola's avatar Jeremy Mikola

Assert operationTime field exists before accessing it

parent 8e88c5c4
......@@ -154,7 +154,9 @@ class WatchFunctionalTest extends FunctionalTestCase
$this->assertCount(1, $events);
$this->assertSame('aggregate', $events[0]['started']->getCommandName());
$operationTime = $events[0]['succeeded']->getReply()->operationTime;
$reply = $events[0]['succeeded']->getReply();
$this->assertObjectHasAttribute('operationTime', $reply);
$operationTime = $reply->operationTime;
$this->assertInstanceOf(TimestampInterface::class, $operationTime);
$this->assertNull($changeStream->current());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment