diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-11-02 18:05:14 +0100 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2016-11-02 18:05:14 +0100 |
commit | 4623b70cc996b5ba0353bc8eea0156ed1d983c6c (patch) | |
tree | c0e4478de0cfb8b181f88dcf53a1d86a82503158 /apps/federatedfilesharing/tests | |
parent | e81d04cd8d2ac0de3d06d4586550469384c5d91a (diff) | |
download | nextcloud-server-4623b70cc996b5ba0353bc8eea0156ed1d983c6c.tar.gz nextcloud-server-4623b70cc996b5ba0353bc8eea0156ed1d983c6c.zip |
catch all exception and return a user friendly exception message
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federatedfilesharing/tests')
-rw-r--r-- | apps/federatedfilesharing/tests/FederatedShareProviderTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index 92f6ac5e996..874d4b48a5c 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php @@ -227,7 +227,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $share = $this->provider->create($share); $this->fail(); } catch (\Exception $e) { - $this->assertEquals('Sharing myFile failed, could not find user@server.com, maybe the server is currently unreachable.', $e->getMessage()); + $this->assertEquals('Sharing myFile failed, could not find user@server.com, maybe the server is currently unreachable or uses a self-signed certificate.', $e->getMessage()); } $qb = $this->connection->getQueryBuilder(); @@ -283,7 +283,7 @@ class FederatedShareProviderTest extends \Test\TestCase { $share = $this->provider->create($share); $this->fail(); } catch (\Exception $e) { - $this->assertEquals('dummy', $e->getMessage()); + $this->assertEquals('Sharing myFile failed, could not find user@server.com, maybe the server is currently unreachable or uses a self-signed certificate.', $e->getMessage()); } $qb = $this->connection->getQueryBuilder(); @@ -707,8 +707,8 @@ class FederatedShareProviderTest extends \Test\TestCase { $userManager = \OC::$server->getUserManager(); $rootFolder = \OC::$server->getRootFolder(); - $u1 = $userManager->createUser('testFed', 'test'); - $u2 = $userManager->createUser('testFed2', 'test'); + $u1 = $userManager->createUser('testFed', md5(time())); + $u2 = $userManager->createUser('testFed2', md5(time())); $folder1 = $rootFolder->getUserFolder($u1->getUID())->newFolder('foo'); $file1 = $folder1->newFile('bar1'); |