diff options
author | kondou <kondou@ts.unde.re> | 2013-08-28 16:39:00 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-08-28 16:39:00 +0200 |
commit | 8d8a57de7fb41030ffb69f098419616f4003119a (patch) | |
tree | 7027a8c0f0f05b9b00eac204f82d941bc610acc6 /tests/lib/avatar.php | |
parent | 1b456831680b8868108afb7ebddce7095943f61c (diff) | |
download | nextcloud-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.php | 12 |
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())); } } |