diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-01-10 17:43:10 +0100 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2016-01-10 17:43:10 +0100 |
commit | 0cc41b94b1715ed6ae0175f77403410552f671af (patch) | |
tree | e1dac35c9bbb4cf4577b1d262c5af9c292f31d7c /tests/log/add_test.php | |
parent | d64680983a5fa06a737a1ae7e164cb7f67a5a53c (diff) | |
download | forums-0cc41b94b1715ed6ae0175f77403410552f671af.tar forums-0cc41b94b1715ed6ae0175f77403410552f671af.tar.gz forums-0cc41b94b1715ed6ae0175f77403410552f671af.tar.bz2 forums-0cc41b94b1715ed6ae0175f77403410552f671af.tar.xz forums-0cc41b94b1715ed6ae0175f77403410552f671af.zip |
[ticket/14403] Don't expect user_id and user_ip in phpbb\log
PHPBB3-14403
Diffstat (limited to 'tests/log/add_test.php')
-rw-r--r-- | tests/log/add_test.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/log/add_test.php b/tests/log/add_test.php index bacc0c76f7..29d3adaeb6 100644 --- a/tests/log/add_test.php +++ b/tests/log/add_test.php @@ -88,5 +88,14 @@ class phpbb_log_add_test extends phpbb_database_test_case // Invalid mode specified $this->assertFalse($log->add('mode_does_not_exist', $user_id, $log_ip, $log_operation, $log_time)); + + // null user and null ip given + $this->assertEquals(3, $log->add($mode, null, null, $log_operation, $log_time), 'Adding log with null user_id and null user_ip failed'); + $sql = 'SELECT user_id, log_ip FROM ' . LOG_TABLE . ' WHERE log_id = 3'; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + $this->assertEquals(ANONYMOUS, $row['user_id'], 'Adding log with null user_id failed'); + $this->assertEquals('', $row['log_ip'], 'Adding log with null user_ip failed'); } } |