From c9d9c71835182831af3e8bfd231e1629406e9098 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 12 Feb 2019 12:28:43 -0800 Subject: [PATCH] Extra check on hasLanguage() and in backup() --- tests/unit/e_db_pdoTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit/e_db_pdoTest.php b/tests/unit/e_db_pdoTest.php index 41a91a289..e3f17581d 100644 --- a/tests/unit/e_db_pdoTest.php +++ b/tests/unit/e_db_pdoTest.php @@ -172,10 +172,16 @@ e107::getConfig()->set('multilanguage',true)->save(); $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); $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->dropTable('lan_spanish_news'); @@ -832,6 +838,8 @@ $compressedSize = filesize($result); $this->assertLessThan($uncompressedSize, $compressedSize); + $result = $this->db->backup('missing_table', null, $opts); + $this->assertFalse($result); }