コード例 #1
0
 public function testGetAvatarValidUser()
 {
     $this->userManager->expects($this->once())->method('get')->with('validUser')->willReturn(true);
     $folder = $this->getMock('\\OCP\\Files\\Folder');
     $this->rootFolder->expects($this->once())->method('getUserFolder')->with('validUser')->willReturn($folder);
     $folder->expects($this->once())->method('getParent')->will($this->returnSelf());
     $this->avatarManager->getAvatar('validUser');
 }
コード例 #2
0
 public function testGetAvatarValidUser()
 {
     $avatar = $this->avatarManager->getAvatar('valid-user');
     $this->assertInstanceOf('\\OCP\\IAvatar', $avatar);
     $this->assertFalse($this->storage->file_exists('files'));
 }