/** * make sure an Interface can be serialized and unserialized and work * * @since 10-3-11 */ public function testSerialize() { $db = $this->getDb(); $table = $this->getTable(__FUNCTION__); $_id_list = $this->insert($table, 1); $sdb = serialize($db); $this->assertInternalType('string', $sdb); $db2 = unserialize($sdb); $where_criteria = new MingoCriteria(); $where_criteria->in_Id($_id_list); $list = $db2->get($table, $where_criteria); $this->assertNotEmpty($list); foreach ($list as $map) { $this->assertContains($map['_id'], $_id_list); } //foreach }