l10n: Fix test

This commit is contained in:
Valdnet 2021-04-15 15:56:42 +02:00 committed by Morris Jobke
parent e7648c2fdd
commit 1627eb45bb
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 23 additions and 23 deletions

View File

@ -596,7 +596,7 @@ class ManagerTest extends \Test\TestCase {
[$this->createShare(null, IShare::TYPE_GROUP, $file, $group0, null, $user0, 31, null, null), 'SharedBy should be set', true],
[$this->createShare(null, IShare::TYPE_LINK, $file, null, null, $user0, 31, null, null), 'SharedBy should be set', true],
[$this->createShare(null, IShare::TYPE_USER, $file, $user0, $user0, $user0, 31, null, null), 'Cant share with yourself', true],
[$this->createShare(null, IShare::TYPE_USER, $file, $user0, $user0, $user0, 31, null, null), 'Cannot share with yourself', true],
[$this->createShare(null, IShare::TYPE_USER, null, $user2, $user0, $user0, 31, null, null), 'Path should be set', true],
[$this->createShare(null, IShare::TYPE_GROUP, null, $group0, $user0, $user0, 31, null, null), 'Path should be set', true],
@ -639,9 +639,9 @@ class ManagerTest extends \Test\TestCase {
$limitedPermssions->method('getMountPoint')->willReturn($mount);
$data[] = [$this->createShare(null, IShare::TYPE_USER, $limitedPermssions, $user2, $user0, $user0, 31, null, null), 'Cant increase permissions of path', true];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $limitedPermssions, $group0, $user0, $user0, 17, null, null), 'Cant increase permissions of path', true];
$data[] = [$this->createShare(null, IShare::TYPE_LINK, $limitedPermssions, null, $user0, $user0, 3, null, null), 'Cant increase permissions of path', true];
$data[] = [$this->createShare(null, IShare::TYPE_USER, $limitedPermssions, $user2, $user0, $user0, 31, null, null), 'Cannot increase permissions of path', true];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $limitedPermssions, $group0, $user0, $user0, 17, null, null), 'Cannot increase permissions of path', true];
$data[] = [$this->createShare(null, IShare::TYPE_LINK, $limitedPermssions, null, $user0, $user0, 3, null, null), 'Cannot increase permissions of path', true];
$nonMoveableMountPermssions = $this->createMock(Folder::class);
$nonMoveableMountPermssions->method('isShareable')->willReturn(true);
@ -654,17 +654,17 @@ class ManagerTest extends \Test\TestCase {
$nonMoveableMountPermssions->method('getStorage')
->willReturn($storage);
$data[] = [$this->createShare(null, IShare::TYPE_USER, $nonMoveableMountPermssions, $user2, $user0, $user0, 11, null, null), 'Cant increase permissions of path', false];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $nonMoveableMountPermssions, $group0, $user0, $user0, 11, null, null), 'Cant increase permissions of path', false];
$data[] = [$this->createShare(null, IShare::TYPE_USER, $nonMoveableMountPermssions, $user2, $user0, $user0, 11, null, null), 'Cannot increase permissions of path', false];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $nonMoveableMountPermssions, $group0, $user0, $user0, 11, null, null), 'Cannot increase permissions of path', false];
$rootFolder = $this->createMock(Folder::class);
$rootFolder->method('isShareable')->willReturn(true);
$rootFolder->method('getPermissions')->willReturn(\OCP\Constants::PERMISSION_ALL);
$rootFolder->method('getId')->willReturn(42);
$data[] = [$this->createShare(null, IShare::TYPE_USER, $rootFolder, $user2, $user0, $user0, 30, null, null), 'You cant share your root folder', true];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $rootFolder, $group0, $user0, $user0, 2, null, null), 'You cant share your root folder', true];
$data[] = [$this->createShare(null, IShare::TYPE_LINK, $rootFolder, null, $user0, $user0, 16, null, null), 'You cant share your root folder', true];
$data[] = [$this->createShare(null, IShare::TYPE_USER, $rootFolder, $user2, $user0, $user0, 30, null, null), 'You cannot share your root folder', true];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $rootFolder, $group0, $user0, $user0, 2, null, null), 'You cannot share your root folder', true];
$data[] = [$this->createShare(null, IShare::TYPE_LINK, $rootFolder, null, $user0, $user0, 16, null, null), 'You cannot share your root folder', true];
$allPermssions = $this->createMock(Folder::class);
$allPermssions->method('isShareable')->willReturn(true);
@ -697,7 +697,7 @@ class ManagerTest extends \Test\TestCase {
->willReturn($storage);
$data[] = [$this->createShare(null, IShare::TYPE_REMOTE, $remoteFile, $user2, $user0, $user0, 1, null, null), null, false];
$data[] = [$this->createShare(null, IShare::TYPE_REMOTE, $remoteFile, $user2, $user0, $user0, 3, null, null), null, false];
$data[] = [$this->createShare(null, IShare::TYPE_REMOTE, $remoteFile, $user2, $user0, $user0, 31, null, null), 'Cant increase permissions of ', true];
$data[] = [$this->createShare(null, IShare::TYPE_REMOTE, $remoteFile, $user2, $user0, $user0, 31, null, null), 'Cannot increase permissions of ', true];
return $data;
}
@ -753,7 +753,7 @@ class ManagerTest extends \Test\TestCase {
public function testGeneralCheckShareRoot() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('You cant share your root folder');
$this->expectExceptionMessage('You cannot share your root folder');
$thrown = null;
@ -925,7 +925,7 @@ class ManagerTest extends \Test\TestCase {
*/
public function testValidateExpirationDateInternalEnforceTooFarIntoFuture($shareType) {
$this->expectException(\OCP\Share\Exceptions\GenericShareException::class);
$this->expectExceptionMessage('Cant set expiration date more than 3 days in the future');
$this->expectExceptionMessage('Cannot set expiration date more than 3 days in the future');
$future = new \DateTime();
$future->add(new \DateInterval('P7D'));
@ -1286,7 +1286,7 @@ class ManagerTest extends \Test\TestCase {
public function testValidateExpirationDateEnforceTooFarIntoFuture() {
$this->expectException(\OCP\Share\Exceptions\GenericShareException::class);
$this->expectExceptionMessage('Cant set expiration date more than 3 days in the future');
$this->expectExceptionMessage('Cannot set expiration date more than 3 days in the future');
$future = new \DateTime();
$future->add(new \DateInterval('P7D'));
@ -2970,7 +2970,7 @@ class ManagerTest extends \Test\TestCase {
public function testUpdateShareCantChangeShareType() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Cant change share type');
$this->expectExceptionMessage('Cannot change share type');
$manager = $this->createManagerMock()
->setMethods([
@ -3024,7 +3024,7 @@ class ManagerTest extends \Test\TestCase {
public function testUpdateShareCantShareWithOwner() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Cant share with the share owner');
$this->expectExceptionMessage('Cannot share with the share owner');
$manager = $this->createManagerMock()
->setMethods([
@ -3238,7 +3238,7 @@ class ManagerTest extends \Test\TestCase {
public function testUpdateShareLinkEnableSendPasswordByTalkWithNoPassword() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Cant enable sending the password by Talk with an empty password');
$this->expectExceptionMessage('Cannot enable sending the password by Talk with an empty password');
$manager = $this->createManagerMock()
->setMethods([
@ -3558,7 +3558,7 @@ class ManagerTest extends \Test\TestCase {
public function testUpdateShareMailEnableSendPasswordByTalkWithNoPassword() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Cant enable sending the password by Talk with an empty password');
$this->expectExceptionMessage('Cannot enable sending the password by Talk with an empty password');
$manager = $this->createManagerMock()
->setMethods([
@ -3631,7 +3631,7 @@ class ManagerTest extends \Test\TestCase {
public function testUpdateShareMailEnableSendPasswordByTalkRemovingPassword() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Cant enable sending the password by Talk with an empty password');
$this->expectExceptionMessage('Cannot enable sending the password by Talk with an empty password');
$manager = $this->createManagerMock()
->setMethods([
@ -3704,7 +3704,7 @@ class ManagerTest extends \Test\TestCase {
public function testUpdateShareMailEnableSendPasswordByTalkRemovingPasswordWithEmptyString() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Cant enable sending the password by Talk with an empty password');
$this->expectExceptionMessage('Cannot enable sending the password by Talk with an empty password');
$manager = $this->createManagerMock()
->setMethods([
@ -3777,7 +3777,7 @@ class ManagerTest extends \Test\TestCase {
public function testUpdateShareMailEnableSendPasswordByTalkWithPreviousPassword() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Cant enable sending the password by Talk without setting a new password');
$this->expectExceptionMessage('Cannot enable sending the password by Talk without setting a new password');
$manager = $this->createManagerMock()
->setMethods([
@ -3851,7 +3851,7 @@ class ManagerTest extends \Test\TestCase {
public function testUpdateShareMailDisableSendPasswordByTalkWithPreviousPassword() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Cant disable sending the password by Talk without setting a new password');
$this->expectExceptionMessage('Cannot disable sending the password by Talk without setting a new password');
$manager = $this->createManagerMock()
->setMethods([
@ -3925,7 +3925,7 @@ class ManagerTest extends \Test\TestCase {
public function testUpdateShareMailDisableSendPasswordByTalkWithoutChangingPassword() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Cant disable sending the password by Talk without setting a new password');
$this->expectExceptionMessage('Cannot disable sending the password by Talk without setting a new password');
$manager = $this->createManagerMock()
->setMethods([
@ -3999,7 +3999,7 @@ class ManagerTest extends \Test\TestCase {
public function testMoveShareLink() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Cant change target of link share');
$this->expectExceptionMessage('Cannot change target of link share');
$share = $this->manager->newShare();
$share->setShareType(IShare::TYPE_LINK);