Fix Sharing app tests with phpunit 5.2+
This commit is contained in:
parent
fd5bdf5e1a
commit
eb715dd1b6
|
@ -668,7 +668,7 @@ class Share20OCSTest extends \Test\TestCase {
|
|||
$user = $this->getMock('\OCP\IUser');
|
||||
$this->userManager->method('userExists')->with('validUser')->willReturn(true);
|
||||
|
||||
$share->method('setPath')->with($path);
|
||||
$share->method('setNode')->with($path);
|
||||
$share->method('setPermissions')
|
||||
->with(
|
||||
\OCP\Constants::PERMISSION_ALL &
|
||||
|
@ -773,7 +773,7 @@ class Share20OCSTest extends \Test\TestCase {
|
|||
->method('allowGroupSharing')
|
||||
->willReturn(true);
|
||||
|
||||
$share->method('setPath')->with($path);
|
||||
$share->method('setNode')->with($path);
|
||||
$share->method('setPermissions')->with(\OCP\Constants::PERMISSION_ALL);
|
||||
$share->method('setShareType')->with(\OCP\Share::SHARE_TYPE_GROUP);
|
||||
$share->method('setSharedWith')->with('validGroup');
|
||||
|
@ -822,7 +822,7 @@ class Share20OCSTest extends \Test\TestCase {
|
|||
->method('allowGroupSharing')
|
||||
->willReturn(false);
|
||||
|
||||
$share->method('setPath')->with($path);
|
||||
$share->method('setNode')->with($path);
|
||||
|
||||
$expected = new \OC_OCS_Result(null, 404, 'group sharing is disabled by the administrator');
|
||||
$result = $this->ocs->createShare();
|
||||
|
|
|
@ -85,10 +85,6 @@ class ShareControllerTest extends \Test\TestCase {
|
|||
$this->userManager = $this->getMock('\OCP\IUserManager');
|
||||
$this->federatedShareProvider = $this->getMockBuilder('OCA\FederatedFileSharing\FederatedShareProvider')
|
||||
->disableOriginalConstructor()->getMock();
|
||||
$this->federatedShareProvider->expects($this->any())
|
||||
->method('isOutgoingServer2serverShareEnabled')->willReturn(true);
|
||||
$this->federatedShareProvider->expects($this->any())
|
||||
->method('isIncomingServer2serverShareEnabled')->willReturn(true);
|
||||
|
||||
$this->shareController = new \OCA\Files_Sharing\Controllers\ShareController(
|
||||
$this->appName,
|
||||
|
@ -476,4 +472,4 @@ class ShareControllerTest extends \Test\TestCase {
|
|||
$this->assertEquals($expectedResponse, $response);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue