2016-11-22 08:53:09 -05:00
|
|
|
<?php
|
2021-04-19 09:50:30 -04:00
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2016-11-22 08:53:09 -05:00
|
|
|
/**
|
2024-05-10 09:09:14 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2016-11-22 08:53:09 -05:00
|
|
|
*/
|
2019-11-22 14:52:10 -05:00
|
|
|
|
2016-11-22 08:53:09 -05:00
|
|
|
namespace Test\Security\IdentityProof;
|
|
|
|
|
|
|
|
|
|
use OC\Security\IdentityProof\Key;
|
|
|
|
|
use Test\TestCase;
|
|
|
|
|
|
|
|
|
|
class KeyTest extends TestCase {
|
|
|
|
|
/** @var Key */
|
|
|
|
|
private $key;
|
|
|
|
|
|
2019-11-27 09:27:18 -05:00
|
|
|
protected function setUp(): void {
|
2016-11-22 08:53:09 -05:00
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
|
|
$this->key = new Key('public', 'private');
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-15 16:32:31 -04:00
|
|
|
public function testGetPrivate(): void {
|
2016-11-22 08:53:09 -05:00
|
|
|
$this->assertSame('private', $this->key->getPrivate());
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-15 16:32:31 -04:00
|
|
|
public function testGetPublic(): void {
|
2016-11-22 08:53:09 -05:00
|
|
|
$this->assertSame('public', $this->key->getPublic());
|
|
|
|
|
}
|
|
|
|
|
}
|