aboutsummaryrefslogtreecommitdiffstats
path: root/tests/avatar/manager_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-06-25 11:35:04 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-06-25 11:35:04 +0200
commit72377075f465119241026728874e35791bbd1f0a (patch)
treedb4666adaa452ced98294470181915e6f8003767 /tests/avatar/manager_test.php
parent25acf3f74cd5ea42dbdf23f5743feb17014c22a0 (diff)
downloadforums-72377075f465119241026728874e35791bbd1f0a.tar
forums-72377075f465119241026728874e35791bbd1f0a.tar.gz
forums-72377075f465119241026728874e35791bbd1f0a.tar.bz2
forums-72377075f465119241026728874e35791bbd1f0a.tar.xz
forums-72377075f465119241026728874e35791bbd1f0a.zip
[ticket/11600] Use local variable for $user in test_localize_errors
PHPBB3-11600
Diffstat (limited to 'tests/avatar/manager_test.php')
-rw-r--r--tests/avatar/manager_test.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php
index 58cad06c5d..4d332e6b0d 100644
--- a/tests/avatar/manager_test.php
+++ b/tests/avatar/manager_test.php
@@ -11,8 +11,6 @@ require_once dirname(__FILE__) . '/driver/foobar.php';
class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
{
- protected $user;
-
public function setUp()
{
global $phpbb_root_path, $phpEx;
@@ -230,23 +228,23 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
public function test_localize_errors()
{
- $this->user = $this->getMock('phpbb_user');
+ $user = $this->getMock('phpbb_user');
$lang_array = array(
array('FOOBAR_OFF', 'foobar_off'),
array('FOOBAR_EXPLAIN', 'FOOBAR_EXPLAIN %s'),
);
- $this->user->expects($this->any())
+ $user->expects($this->any())
->method('lang')
->will($this->returnValueMap($lang_array));
// Pass error as string
- $this->assertEquals(array('foobar_off'), $this->manager->localize_errors($this->user, array('FOOBAR_OFF')));
+ $this->assertEquals(array('foobar_off'), $this->manager->localize_errors($user, array('FOOBAR_OFF')));
// Pass error as array for vsprintf()
- $this->assertEquals(array('FOOBAR_EXPLAIN foo'), $this->manager->localize_errors($this->user, array(array('FOOBAR_EXPLAIN', 'foo'))));
+ $this->assertEquals(array('FOOBAR_EXPLAIN foo'), $this->manager->localize_errors($user, array(array('FOOBAR_EXPLAIN', 'foo'))));
// Pass both types
- $this->assertEquals(array('foobar_off', 'FOOBAR_EXPLAIN foo'), $this->manager->localize_errors($this->user, array(
+ $this->assertEquals(array('foobar_off', 'FOOBAR_EXPLAIN foo'), $this->manager->localize_errors($user, array(
'FOOBAR_OFF',
array('FOOBAR_EXPLAIN', 'foo'),
)));