diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-01-15 11:18:13 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-01-15 11:18:13 +0100 |
commit | 97e002cc3dc9a19b1fca10109c61b3d4e66ef201 (patch) | |
tree | cb87b284a5a4728ee59817065990e2989ddfcd7b /tests | |
parent | 254291b644c38a15f2b5ecf4babcbb0be5097828 (diff) | |
parent | 295a424fc72a4e810d89a183f43cba3c2a6fee76 (diff) | |
download | forums-97e002cc3dc9a19b1fca10109c61b3d4e66ef201.tar forums-97e002cc3dc9a19b1fca10109c61b3d4e66ef201.tar.gz forums-97e002cc3dc9a19b1fca10109c61b3d4e66ef201.tar.bz2 forums-97e002cc3dc9a19b1fca10109c61b3d4e66ef201.tar.xz forums-97e002cc3dc9a19b1fca10109c61b3d4e66ef201.zip |
Merge branch '3.1.x'
Conflicts:
phpBB/phpbb/log/log.php
Diffstat (limited to 'tests')
-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 cfc592a464..ea1ae74d53 100644 --- a/tests/log/add_test.php +++ b/tests/log/add_test.php @@ -92,5 +92,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'); } } |