summaryrefslogtreecommitdiffstats
path: root/tests/lib/avatar.php
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-08-28 16:39:00 +0200
committerkondou <kondou@ts.unde.re>2013-08-28 16:39:00 +0200
commit8d8a57de7fb41030ffb69f098419616f4003119a (patch)
tree7027a8c0f0f05b9b00eac204f82d941bc610acc6 /tests/lib/avatar.php
parent1b456831680b8868108afb7ebddce7095943f61c (diff)
downloadnextcloud-server-8d8a57de7fb41030ffb69f098419616f4003119a.tar.gz
nextcloud-server-8d8a57de7fb41030ffb69f098419616f4003119a.zip
Continue work on cropper
Diffstat (limited to 'tests/lib/avatar.php')
-rw-r--r--tests/lib/avatar.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/lib/avatar.php b/tests/lib/avatar.php
index 76cbd85fc4f..321bb771fb4 100644
--- a/tests/lib/avatar.php
+++ b/tests/lib/avatar.php
@@ -9,14 +9,16 @@
class Test_Avatar extends PHPUnit_Framework_TestCase {
public function testAvatar() {
- $this->assertEquals(false, \OC_Avatar::get(\OC_User::getUser()));
+ $avatar = new \OC_Avatar();
+
+ $this->assertEquals(false, $avatar->get(\OC_User::getUser()));
$expected = new OC_Image(\OC::$SERVERROOT.'/tests/data/testavatar.png');
- \OC_Avatar::set(\OC_User::getUser(), $expected->data());
+ $avatar->set(\OC_User::getUser(), $expected->data());
$expected->resize(64);
- $this->assertEquals($expected->data(), \OC_Avatar::get(\OC_User::getUser())->data());
+ $this->assertEquals($expected->data(), $avatar->get(\OC_User::getUser())->data());
- \OC_Avatar::remove(\OC_User::getUser());
- $this->assertEquals(false, \OC_Avatar::get(\OC_User::getUser()));
+ $avatar->remove(\OC_User::getUser());
+ $this->assertEquals(false, $avatar->get(\OC_User::getUser()));
}
}