1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Added test for mysql backup

This commit is contained in:
Cameron
2019-01-28 18:50:27 -08:00
parent ccab9960bf
commit 3d3b54e11f

View File

@@ -472,12 +472,27 @@
{
}
*/
public function testBackup()
{
$opts = array(
'gzip' => false,
'nologs' => false,
'droptable' => false,
);
$result = $this->db->backup('user,core_media_cat', null, $opts);
$tmp = file_get_contents($result);
$this->assertNotContains("DROP TABLE IF EXISTS `e107_user`;", $tmp);
$this->assertContains("CREATE TABLE `e107_user` (", $tmp);
$this->assertContains("INSERT INTO `e107_user` VALUES (1", $tmp);
$this->assertContains("CREATE TABLE `e107_core_media_cat`", $tmp);
}
/*
public function testDbError()
{