1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 20:24:08 +02:00

[ticket/12683] Improve exception handling

PHPBB3-12683
This commit is contained in:
Ruben Calvo
2022-12-11 16:42:02 +01:00
parent 8cea785f36
commit f9f55eb012
12 changed files with 117 additions and 5 deletions

View File

@@ -66,4 +66,16 @@ class phpbb_console_searchindex_create_test extends phpbb_console_searchindex_ba
$this->config['search_indexing_state'] = [];
}
public function test_create_when_search_backend_not_available()
{
$command_tester = $this->get_command_tester();
$command_tester->execute([
'search-backend' => 'search_backend_mock_not_available',
]);
$this->assertEquals(Command::FAILURE, $command_tester->getStatusCode());
$this->assertStringContainsString('CLI_SEARCHINDEX_BACKEND_NOT_AVAILABLE', $command_tester->getDisplay());
}
}