Skip to content

Commit

Permalink
Match create parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Bishop <danielbishop250@gmail.com>
  • Loading branch information
Tetrachloroethene committed Feb 22, 2021
1 parent ce0aa8e commit 56cc408
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\Collaboration\Collaborators\ISearch;
use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\Share\IShare;
use OCP\Share\IManager;

Expand All @@ -65,6 +67,12 @@ class ShareesAPIControllerTest extends TestCase {
/** @var ISearch|\PHPUnit\Framework\MockObject\MockObject */
protected $collaboratorSearch;

/** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */
private $groupManager;

/** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;

protected function setUp(): void {
parent::setUp();

Expand All @@ -80,14 +88,20 @@ protected function setUp(): void {

$this->collaboratorSearch = $this->createMock(ISearch::class);

$this->groupManager = $this->createMock(IGroupManager::class);

$this->userManager = $this->createMock(IUserManager::class);

$this->sharees = new ShareesAPIController(
$this->uid,
'files_sharing',
$this->request,
$configMock,
$urlGeneratorMock,
$this->shareManager,
$this->collaboratorSearch
$this->collaboratorSearch,
$this->groupManager,
$this->userManager
);
}

Expand Down Expand Up @@ -239,6 +253,8 @@ public function testSearch($getData, $apiSetting, $enumSetting, $remoteSharingEn

/** @var IConfig|\PHPUnit\Framework\MockObject\MockObject $config */
$config = $this->createMock(IConfig::class);

// TODO: Add exclude groups config request
$config->expects($this->exactly(1))
->method('getAppValue')
->with($this->anything(), $this->anything(), $this->anything())
Expand Down

0 comments on commit 56cc408

Please sign in to comment.