From 3521d2e9fa6f6ceaeba3886936ff8417d60537a4 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Thu, 12 Nov 2020 08:16:46 +0100 Subject: [PATCH] [ticket/16629] Fix ACP get_database_size() for MySql 8 Add functional test (thanks rxu) PHPBB3-16629 --- tests/functional/acp_main_test.php | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/functional/acp_main_test.php diff --git a/tests/functional/acp_main_test.php b/tests/functional/acp_main_test.php new file mode 100644 index 0000000000..d392102e1a --- /dev/null +++ b/tests/functional/acp_main_test.php @@ -0,0 +1,31 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +/** +* @group functional +*/ +class phpbb_functional_acp_main_test extends phpbb_functional_test_case +{ + public function test_acp_database_size() + { + $this->add_lang(['acp/common', 'acp/board']); + $this->login(); + $this->admin_login(); + + $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid); + $this->assertContainsLang('WELCOME_PHPBB', $this->get_content()); + $this->assertContainsLang('ADMIN_INTRO', $this->get_content()); + $this->assertContainsLang('DATABASE_SIZE', $crawler->filter('tbody > tr')->eq(2)->filter('td[class="tabled"]')->eq(0)->text()); + $this->assertNotContainsLang('NOT_AVAILABLE', $crawler->filter('tbody > tr')->eq(2)->filter('td[class="tabled"]')->eq(1)->text()); + } +}