0
0
mirror of https://github.com/nextcloud/server.git synced 2024-12-29 00:18:42 +00:00
nextcloud_server/tests/lib/Federation/CloudIdTest.php
Christoph Wurst 49dd79eabb
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 22:32:31 +02:00

32 lines
728 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): void {
$cloudId = new CloudId($id, '', '');
$this->assertEquals($display, $cloudId->getDisplayId());
}
}