Added first few test cases

This commit is contained in:
2020-07-13 23:24:30 +02:00
parent 422e6be3f4
commit 42d43c947f
2 changed files with 60 additions and 0 deletions
+11
View File
@@ -78,6 +78,7 @@ class LiteDb
call_user_func($upgradeHandler, $this, $this->version);
// Write the new version number to the database
$this->dbSetMeta(self::META_SCHEMA_VERSION, $version);
$this->version = $version;
}
// Refresh the database version, for debug purposes
@@ -179,6 +180,16 @@ class LiteDb
return $this->stores[$storeName];
}
public function hasStore(string $storeName): bool
{
return array_key_exists($storeName, $this->storeMeta);
}
public function getVersion(): int
{
return $this->version;
}
/**
*
* @param string