mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/12639] Add a test case with an empty keywords list
PHPBB3-12639
This commit is contained in:
parent
36071ded9d
commit
9c497a7b46
2 changed files with 6 additions and 1 deletions
|
@ -395,7 +395,7 @@ class log implements \phpbb\log\log_interface
|
||||||
{
|
{
|
||||||
if ($field == 'keywords')
|
if ($field == 'keywords')
|
||||||
{
|
{
|
||||||
$sql_where .= $this->generate_sql_keyword($field_value, '', '');
|
$sql_where .= $this->generate_sql_keyword($field_value, '', ' AND');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,5 +56,10 @@ class phpbb_log_delete_test extends phpbb_database_test_case
|
||||||
$this->assertCount(3, $log->get_logs('critical', false, 0, 0, 0, 0, 0, 0, 'l.log_time DESC'));
|
$this->assertCount(3, $log->get_logs('critical', false, 0, 0, 0, 0, 0, 0, 'l.log_time DESC'));
|
||||||
$log->delete('critical', array('user_id' => array('>', 1)));
|
$log->delete('critical', array('user_id' => array('>', 1)));
|
||||||
$this->assertCount(1, $log->get_logs('critical', false, 0, 0, 0, 0, 0, 0, 'l.log_time DESC'));
|
$this->assertCount(1, $log->get_logs('critical', false, 0, 0, 0, 0, 0, 0, 'l.log_time DESC'));
|
||||||
|
|
||||||
|
// Delete with an empty keyword list
|
||||||
|
$this->assertCount(1, $log->get_logs('critical', false, 0, 0, 0, 0, 0, 0, 'l.log_time DESC'));
|
||||||
|
$log->delete('critical', array('keywords' => ''));
|
||||||
|
$this->assertEmpty($log->get_logs('critical', false, 0, 0, 0, 0, 0, 0, 'l.log_time DESC'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue