diff options
author | Justin Velluppillai <justin@innocraft.com> | 2021-07-19 21:21:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-19 21:21:20 +0300 |
commit | 9aea15489e3a4bd237933e089daaae64722efec2 (patch) | |
tree | 7decef062118cfec6cccc64b1df991de968ade79 /plugins/Installation/tests | |
parent | de484d49afbf14b538add8ccb4bae37d0d3f5d81 (diff) |
More helpful messages on db connection failures (#17789)
* Added a message map to allow translating db error messages
* Allow translation of db error message
* Also include mysql error numbers as possible detection mechanisms for errors
* Only create a new exception if we're changing the message
* Missed change
* Fixing tests
* More test fixes
* Update en.json
Use MySQL server has gone away to help people google the fix
Diffstat (limited to 'plugins/Installation/tests')
-rw-r--r-- | plugins/Installation/tests/System/APITest.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Installation/tests/System/APITest.php b/plugins/Installation/tests/System/APITest.php index faca839ee0..370b99e3bc 100644 --- a/plugins/Installation/tests/System/APITest.php +++ b/plugins/Installation/tests/System/APITest.php @@ -47,7 +47,7 @@ class APITest extends SystemTestCase $data = str_replace("\n", "", $response['data']); $this->assertStringStartsWith('<?xml version="1.0" encoding="utf-8" ?><result> <error message=', $data); - self::assertStringContainsString('Access denied', $data); + self::assertStringContainsString('Database access denied', $data); $this->assertStringEndsWith('</result>', $data); } @@ -58,7 +58,7 @@ class APITest extends SystemTestCase $data = str_replace("\n", "", $response['data']); $this->assertStringStartsWith('{"result":"error","message":"', $data); - self::assertStringContainsString('Access denied', $data); + self::assertStringContainsString('Database access denied', $data); } public function test_shouldReturnEmptyResultWhenNotInstalledAndDispatchIsDisabled() |