summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-09-09 16:57:46 +0200
committerkondou <kondou@ts.unde.re>2013-09-09 16:57:46 +0200
commit1832eb88726dce70d4f8a0a45bd574b0b688ab26 (patch)
treece7c5b7a0e8a3e61f8bb93312cb7fedb6a4a58a7 /tests
parentd18a070a0393ac3846053bcef1833dd01856e117 (diff)
downloadnextcloud-server-1832eb88726dce70d4f8a0a45bd574b0b688ab26.tar.gz
nextcloud-server-1832eb88726dce70d4f8a0a45bd574b0b688ab26.zip
Pass view in \OC_Avatar to constructor and use $_ for enable_avatars
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/avatar.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/avatar.php b/tests/lib/avatar.php
index 027e88d726d..1c5195f8eb1 100644
--- a/tests/lib/avatar.php
+++ b/tests/lib/avatar.php
@@ -11,16 +11,16 @@ class Test_Avatar extends PHPUnit_Framework_TestCase {
public function testAvatar() {
$this->markTestSkipped("Setting custom avatars with encryption doesn't work yet");
- $avatar = new \OC_Avatar();
+ $avatar = new \OC_Avatar(\OC_User::getUser());
- $this->assertEquals(false, $avatar->get(\OC_User::getUser()));
+ $this->assertEquals(false, $avatar->get());
$expected = new OC_Image(\OC::$SERVERROOT.'/tests/data/testavatar.png');
- $avatar->set(\OC_User::getUser(), $expected->data());
+ $avatar->set($expected->data());
$expected->resize(64);
- $this->assertEquals($expected->data(), $avatar->get(\OC_User::getUser())->data());
+ $this->assertEquals($expected->data(), $avatar->get()->data());
- $avatar->remove(\OC_User::getUser());
- $this->assertEquals(false, $avatar->get(\OC_User::getUser()));
+ $avatar->remove();
+ $this->assertEquals(false, $avatar->get());
}
}