public function testSerialize() { $this->prepareData(); $cursor = $this->getCollection()->aggregateCursor([['$match' => ['foo' => 'bar']]]); $this->assertInternalType('string', serialize($cursor)); }