mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Extra check on hasLanguage() and in backup()
This commit is contained in:
@@ -172,10 +172,16 @@
|
|||||||
e107::getConfig()->set('multilanguage',true)->save();
|
e107::getConfig()->set('multilanguage',true)->save();
|
||||||
|
|
||||||
$this->db->setLanguage('Spanish');
|
$this->db->setLanguage('Spanish');
|
||||||
|
$this->db->resetTableList(); // reload the table list so it includes the copied table above.
|
||||||
|
|
||||||
$result = $this->db->db_IsLang('news', false);
|
$result = $this->db->db_IsLang('news', false);
|
||||||
$this->assertEquals('lan_spanish_news', $result);
|
$this->assertEquals('lan_spanish_news', $result);
|
||||||
|
|
||||||
|
|
||||||
|
$result = $this->db->db_IsLang('news', true);
|
||||||
|
$expected = array ('spanish' => array ('e107_news' => 'e107_lan_spanish_news', ),);
|
||||||
|
$this->assertEquals($expected, $result);
|
||||||
|
|
||||||
$this->db->setLanguage('English');
|
$this->db->setLanguage('English');
|
||||||
|
|
||||||
$this->db->dropTable('lan_spanish_news');
|
$this->db->dropTable('lan_spanish_news');
|
||||||
@@ -832,6 +838,8 @@
|
|||||||
$compressedSize = filesize($result);
|
$compressedSize = filesize($result);
|
||||||
$this->assertLessThan($uncompressedSize, $compressedSize);
|
$this->assertLessThan($uncompressedSize, $compressedSize);
|
||||||
|
|
||||||
|
$result = $this->db->backup('missing_table', null, $opts);
|
||||||
|
$this->assertFalse($result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user