diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-08-08 12:01:29 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-08-08 12:01:29 +0200 |
commit | 70978e96d34ddf3bea24c363800e9fc920c3120b (patch) | |
tree | b5f91731df2cc8f9a00e1978ea1482fb03354687 /tests/avatar/manager_test.php | |
parent | e0c2013bb921f04f032744c3bc351c015c759d8d (diff) | |
download | forums-70978e96d34ddf3bea24c363800e9fc920c3120b.tar forums-70978e96d34ddf3bea24c363800e9fc920c3120b.tar.gz forums-70978e96d34ddf3bea24c363800e9fc920c3120b.tar.bz2 forums-70978e96d34ddf3bea24c363800e9fc920c3120b.tar.xz forums-70978e96d34ddf3bea24c363800e9fc920c3120b.zip |
[ticket/12822] Fix test runs of avatar manager_test
PHPBB3-12822
Diffstat (limited to 'tests/avatar/manager_test.php')
-rw-r--r-- | tests/avatar/manager_test.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index a63a13ce50..e600ecb9cc 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -72,11 +72,11 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case { if ($driver !== 'upload') { - $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $path_helper, $cache)); + $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($this->config, $phpbb_root_path, $phpEx, $path_helper, $cache)); } else { - $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $path_helper, $guesser, $cache)); + $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($this->config, $phpbb_root_path, $phpEx, $path_helper, $guesser, $cache)); } $cur_avatar->expects($this->any()) ->method('get_name') @@ -323,7 +323,14 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case $sql = 'SELECT * FROM ' . $table . ' WHERE ' . $prefix . 'id = ' . $id; - $result = $this->db->sql_query($sql); - $this->assertSame($expected, $this->manager->clean_row($this->db->sql_fetchrow($result), substr($prefix, -1))); + $result = $this->db->sql_query_limit($sql, 1); + + $row = $this->manager->clean_row($this->db->sql_fetchrow($result), substr($prefix, 0, -1)); + $this->db->sql_freeresult($result); + + foreach ($expected as $key => $value) + { + $this->assertEquals($value, $row[$key]); + } } } |