diff options
author | Robin Appelman <robin@icewind.nl> | 2017-02-09 13:31:06 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-02-09 13:31:06 +0100 |
commit | f6cd5200a20f7adfe3b3f7b48d0ade4a75829a31 (patch) | |
tree | cf12003e7ccc74b37d59e4e234aaf45535fcb3ce /tests/lib/Federation/CloudIdManagerTest.php | |
parent | ae66cf8d3713e6ed84396a23b506a7252b5860bc (diff) | |
download | nextcloud-server-f6cd5200a20f7adfe3b3f7b48d0ade4a75829a31.tar.gz nextcloud-server-f6cd5200a20f7adfe3b3f7b48d0ade4a75829a31.zip |
clean cloud ids
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Federation/CloudIdManagerTest.php')
-rw-r--r-- | tests/lib/Federation/CloudIdManagerTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/lib/Federation/CloudIdManagerTest.php b/tests/lib/Federation/CloudIdManagerTest.php index 3f1cfabe202..fe673588bba 100644 --- a/tests/lib/Federation/CloudIdManagerTest.php +++ b/tests/lib/Federation/CloudIdManagerTest.php @@ -35,12 +35,11 @@ class CloudIdManagerTest extends TestCase { public function cloudIdProvider() { return [ - ['test@example.com', 'test', 'example.com'], - ['test@example.com/cloud', 'test', 'example.com/cloud'], - ['test@example.com/cloud/', 'test', 'example.com/cloud'], - ['test@example.com/cloud/index.php', 'test', 'example.com/cloud'], - ['test@example.com@example.com', 'test@example.com', 'example.com'], - ['test@example.com@example.com', 'test@example.com', 'example.com'], + ['test@example.com', 'test', 'example.com', 'test@example.com'], + ['test@example.com/cloud', 'test', 'example.com/cloud', 'test@example.com/cloud'], + ['test@example.com/cloud/', 'test', 'example.com/cloud', 'test@example.com/cloud'], + ['test@example.com/cloud/index.php', 'test', 'example.com/cloud', 'test@example.com/cloud'], + ['test@example.com@example.com', 'test@example.com', 'example.com', 'test@example.com@example.com'], ]; } @@ -51,11 +50,12 @@ class CloudIdManagerTest extends TestCase { * @param string $user * @param string $remote */ - public function testResolveCloudId($cloudId, $user, $remote) { + public function testResolveCloudId($cloudId, $user, $remote, $cleanId) { $cloudId = $this->cloudIdManager->resolveCloudId($cloudId); $this->assertEquals($user, $cloudId->getUser()); $this->assertEquals($remote, $cloudId->getRemote()); + $this->assertEquals($cleanId, $cloudId->getId()); } public function invalidCloudIdProvider() { |