Fix unit test

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2018-02-28 16:04:45 +01:00
parent 8f8d7cf9d3
commit d16aa27516
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 6 additions and 0 deletions

View File

@ -28,6 +28,7 @@ use OCA\Files\Activity\Provider;
use OCP\Activity\IEvent; use OCP\Activity\IEvent;
use OCP\Activity\IEventMerger; use OCP\Activity\IEventMerger;
use OCP\Activity\IManager; use OCP\Activity\IManager;
use OCP\Files\IRootFolder;
use OCP\IURLGenerator; use OCP\IURLGenerator;
use OCP\IUser; use OCP\IUser;
use OCP\IUserManager; use OCP\IUserManager;
@ -49,6 +50,8 @@ class ProviderTest extends TestCase {
protected $activityManager; protected $activityManager;
/** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
protected $userManager; protected $userManager;
/** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
protected $rootFolder;
/** @var IEventMerger|\PHPUnit_Framework_MockObject_MockObject */ /** @var IEventMerger|\PHPUnit_Framework_MockObject_MockObject */
protected $eventMerger; protected $eventMerger;
@ -59,6 +62,7 @@ class ProviderTest extends TestCase {
$this->url = $this->createMock(IURLGenerator::class); $this->url = $this->createMock(IURLGenerator::class);
$this->activityManager = $this->createMock(IManager::class); $this->activityManager = $this->createMock(IManager::class);
$this->userManager = $this->createMock(IUserManager::class); $this->userManager = $this->createMock(IUserManager::class);
$this->rootFolder = $this->createMock(IRootFolder::class);
$this->eventMerger = $this->createMock(IEventMerger::class); $this->eventMerger = $this->createMock(IEventMerger::class);
} }
@ -74,6 +78,7 @@ class ProviderTest extends TestCase {
$this->url, $this->url,
$this->activityManager, $this->activityManager,
$this->userManager, $this->userManager,
$this->rootFolder,
$this->eventMerger, $this->eventMerger,
]) ])
->setMethods($methods) ->setMethods($methods)
@ -84,6 +89,7 @@ class ProviderTest extends TestCase {
$this->url, $this->url,
$this->activityManager, $this->activityManager,
$this->userManager, $this->userManager,
$this->rootFolder,
$this->eventMerger $this->eventMerger
); );
} }