public function testValidId() { $a = array(); $a[] = self::$db->load(null); $a[] = self::$db->load(''); $a[] = self::$db->load(0); $ex = array(null, null, null); $this->assertEquals($ex, $a); }
/** * Load index */ public function restore() { $index = $this->db->load('_' . $this->name . '_index'); $this->map = @$index['map']; $this->inverse = @$index['inverse']; if (empty($this->map)) { $this->map = array(); } if (empty($this->inverse)) { $this->inverse = array(); } $this->sort(); // json does not guarantee sorted storage }