0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-01-31 06:43:12 +00:00
nextcloud_server/tests/lib/Federation/CloudIdTest.php
Andy Scherzinger 1f7e2ba599
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +02:00

31 lines
722 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Federation;
use OC\Federation\CloudId;
use Test\TestCase;
class CloudIdTest extends TestCase {
public function dataGetDisplayCloudId() {
return [
['test@example.com', 'test@example.com'],
['test@http://example.com', 'test@example.com'],
['test@https://example.com', 'test@example.com'],
];
}
/**
* @dataProvider dataGetDisplayCloudId
*
* @param string $id
* @param string $display
*/
public function testGetDisplayCloudId($id, $display) {
$cloudId = new CloudId($id, '', '');
$this->assertEquals($display, $cloudId->getDisplayId());
}
}