namespace OC\Core\Controller;
use OC\AppFramework\Utility\TimeFactory;
-use OCP\Accounts\IAccountManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataDisplayResponse;
/** @var TimeFactory */
protected $timeFactory;
- /** @var IAccountManager */
- private $accountManager;
public function __construct($appName,
IRequest $request,
IRootFolder $rootFolder,
ILogger $logger,
$userId,
- TimeFactory $timeFactory,
- IAccountManager $accountManager) {
+ TimeFactory $timeFactory) {
parent::__construct($appName, $request);
$this->avatarManager = $avatarManager;
$this->logger = $logger;
$this->userId = $userId;
$this->timeFactory = $timeFactory;
- $this->accountManager = $accountManager;
}
use OC\AppFramework\Utility\TimeFactory;
use OC\Core\Controller\AvatarController;
-use OCP\Accounts\IAccount;
-use OCP\Accounts\IAccountManager;
-use OCP\Accounts\IAccountProperty;
use OCP\AppFramework\Http;
use OCP\Files\File;
use OCP\Files\IRootFolder;
use OCP\IRequest;
use OCP\IUser;
use OCP\IUserManager;
-use PHPUnit\Framework\MockObject\MockObject;
/**
* Class AvatarControllerTest
private $request;
/** @var TimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
- /** @var IAccountManager|MockObject */
- private $accountManager;
protected function setUp(): void {
parent::setUp();
$this->rootFolder = $this->getMockBuilder('OCP\Files\IRootFolder')->getMock();
$this->logger = $this->getMockBuilder(ILogger::class)->getMock();
$this->timeFactory = $this->getMockBuilder('OC\AppFramework\Utility\TimeFactory')->getMock();
- $this->accountManager = $this->createMock(IAccountManager::class);
$this->avatarMock = $this->getMockBuilder('OCP\IAvatar')->getMock();
$this->userMock = $this->getMockBuilder(IUser::class)->getMock();
$this->rootFolder,
$this->logger,
'userid',
- $this->timeFactory,
- $this->accountManager
+ $this->timeFactory
);
// Configure userMock