diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index 0879217e293..6f0cb93c4a9 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php @@ -459,7 +459,7 @@ class FederatedShareProviderTest extends \Test\TestCase { try { $this->provider->create($share); } catch (\Exception $e) { - $this->assertEquals('Sharing myFile failed, because this item is already shared with account user@server.com', $e->getMessage()); + $this->assertEquals('Sharing myFile failed, because this item is already shared with the account user@server.com', $e->getMessage()); } } diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index eb77cd3142b..caa121932f9 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -1679,7 +1679,7 @@ class ShareAPIControllerTest extends TestCase { public function testCreateShareUserNoShareWith() { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); - $this->expectExceptionMessage('Please specify a valid person to share with'); + $this->expectExceptionMessage('Please specify a valid account to share with'); $share = $this->newShare(); $this->shareManager->method('newShare')->willReturn($share); @@ -1707,7 +1707,7 @@ class ShareAPIControllerTest extends TestCase { public function testCreateShareUserNoValidShareWith() { $this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); - $this->expectExceptionMessage('Please specify a valid person to share with'); + $this->expectExceptionMessage('Please specify a valid account to share with'); $share = $this->newShare(); $this->shareManager->method('newShare')->willReturn($share); diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index d255b5e9b1a..1c7b716e1e4 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -116,8 +116,8 @@ class ShareByMailProvider implements IShareProvider { */ $alreadyShared = $this->getSharedWith($shareWith, IShare::TYPE_EMAIL, $share->getNode(), 1, 0); if (!empty($alreadyShared)) { - $message = 'Sharing %1$s failed, because this item is already shared with account %2$s'; - $message_t = $this->l->t('Sharing %1$s failed, because this item is already shared with account %2$s', [$share->getNode()->getName(), $shareWith]); + $message = 'Sharing %1$s failed, because this item is already shared with the account %2$s'; + $message_t = $this->l->t('Sharing %1$s failed, because this item is already shared with the account %2$s', [$share->getNode()->getName(), $shareWith]); $this->logger->debug(sprintf($message, $share->getNode()->getName(), $shareWith), ['app' => 'Federated File Sharing']); throw new \Exception($message_t); } diff --git a/core/Controller/ProfileApiController.php b/core/Controller/ProfileApiController.php index 1ffba071f2b..7a11e5f93c1 100644 --- a/core/Controller/ProfileApiController.php +++ b/core/Controller/ProfileApiController.php @@ -64,7 +64,7 @@ class ProfileApiController extends OCSController { * @return DataResponse, array{}> * @throws OCSBadRequestException Updating visibility is not possible * @throws OCSForbiddenException Not allowed to edit other users visibility - * @throws OCSNotFoundException User not found + * @throws OCSNotFoundException Account not found * * 200: Visibility updated successfully */ diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index ca99a4299ce..40af8546818 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -578,7 +578,7 @@ class Manager implements IManager { // Identical share already exists if ($existingShare->getSharedWith() === $share->getSharedWith() && $existingShare->getShareType() === $share->getShareType()) { - $message = $this->l->t('Sharing %s failed, because this item is already shared with account %s', [$share->getNode()->getName(), $share->getSharedWithDisplayName()]); + $message = $this->l->t('Sharing %s failed, because this item is already shared with the account %s', [$share->getNode()->getName(), $share->getSharedWithDisplayName()]); throw new AlreadySharedException($message, $existingShare); } @@ -589,7 +589,7 @@ class Manager implements IManager { $user = $this->userManager->get($share->getSharedWith()); if ($group->inGroup($user) && $existingShare->getShareOwner() !== $share->getShareOwner()) { - $message = $this->l->t('Sharing %s failed, because this item is already shared with account %s', [$share->getNode()->getName(), $share->getSharedWithDisplayName()]); + $message = $this->l->t('Sharing %s failed, because this item is already shared with the account %s', [$share->getNode()->getName(), $share->getSharedWithDisplayName()]); throw new AlreadySharedException($message, $existingShare); } } diff --git a/tests/Core/Controller/OCSControllerTest.php b/tests/Core/Controller/OCSControllerTest.php index 61ed4a50d62..a10455e482a 100644 --- a/tests/Core/Controller/OCSControllerTest.php +++ b/tests/Core/Controller/OCSControllerTest.php @@ -196,7 +196,7 @@ class OCSControllerTest extends TestCase { ->with('NotExistingUser') ->willReturn(null); - $expected = new DataResponse(['User not found'], 404); + $expected = new DataResponse(['Account not found'], 404); $this->assertEquals($expected, $this->controller->getIdentityProof('NotExistingUser')); } diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 165b818517b..bf871b2bf8f 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -1618,7 +1618,7 @@ class ManagerTest extends \Test\TestCase { public function testUserCreateChecksIdenticalShareExists() { $this->expectException(AlreadySharedException::class); - $this->expectExceptionMessage('Sharing name.txt failed, because this item is already shared with account user'); + $this->expectExceptionMessage('Sharing name.txt failed, because this item is already shared with the account user'); $share = $this->manager->newShare(); $share->setSharedWithDisplayName('user'); @@ -1647,7 +1647,7 @@ class ManagerTest extends \Test\TestCase { public function testUserCreateChecksIdenticalPathSharedViaGroup() { $this->expectException(AlreadySharedException::class); - $this->expectExceptionMessage('Sharing name2.txt failed, because this item is already shared with account userName'); + $this->expectExceptionMessage('Sharing name2.txt failed, because this item is already shared with the account userName'); $share = $this->manager->newShare();