diff options
-rw-r--r-- | tests/lib/user/user.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lib/user/user.php b/tests/lib/user/user.php index bc1365d35bf..52f0a125303 100644 --- a/tests/lib/user/user.php +++ b/tests/lib/user/user.php @@ -11,6 +11,13 @@ namespace Test\User; use OC\Hooks\PublicEmitter; +/** + * Class User + * + * @group DB + * + * @package Test\User + */ class User extends \Test\TestCase { public function testDisplayName() { /** @@ -454,4 +461,15 @@ class User extends \Test\TestCase { $this->assertTrue($user->delete()); $this->assertEquals(2, $hooksCalled); } + + public function testGetCloudId() { + /** + * @var \OC_User_Backend | \PHPUnit_Framework_MockObject_MockObject $backend + */ + $backend = $this->getMock('\Test\Util\User\Dummy'); + $urlGenerator = $this->getMockBuilder('\OC\URLGenerator') + ->disableOriginalConstructor()->getMock(); + $user = new \OC\User\User('foo', $backend, null, null, null, $urlGenerator); + $this->assertEquals("foo@localhost", $user->getCloudId()); + } } |