mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-25 01:06:56 +01:00
* fix "yoda_style" * fix "is_null" * rm useless rule ignores * add full "PhpCsFixer:risky" ruleset * fix "implode_call" * fix "no_alias_functions" * fix "array_push" * fix "long_to_shorthand_operator" * fix "ternary_to_elvis_operator" * fix "logical_operators" * fix "fopen_flags" * rename "returns" phpdoc tags to "return" * fix "php_unit_construct" * fix "function_to_constant" * fix "php_unit_data_provider_return_type" * fix "php_unit_set_up_tear_down_visibility" * some safe "string_length_to_empty" * fix "phpdoc_align" * fix "phpdoc_no_alias_tag" * fix "trailing_comma_in_multiline" --------- Co-authored-by: Aleksander Machniak <alec@alec.pl>
28 lines
769 B
PHP
28 lines
769 B
PHP
<?php
|
|
|
|
class Enigma_EnigmaKey extends PHPUnit\Framework\TestCase
|
|
{
|
|
static function setUpBeforeClass(): void
|
|
{
|
|
include_once __DIR__ . '/../lib/enigma_key.php';
|
|
}
|
|
|
|
/**
|
|
* Test "empty" key
|
|
*/
|
|
function test_empty_key()
|
|
{
|
|
$key = new enigma_key();
|
|
|
|
$this->assertInstanceOf('enigma_key', $key);
|
|
$this->assertSame(enigma_key::TYPE_UNKNOWN, $key->get_type());
|
|
$this->assertFalse($key->is_revoked());
|
|
$this->assertFalse($key->is_valid());
|
|
$this->assertFalse($key->is_private());
|
|
$this->assertNull($key->find_subkey('test@domain.com', enigma_key::CAN_SIGN));
|
|
|
|
$this->assertSame('89E037A5', $key::format_id('04622F2089E037A5'));
|
|
// TODO: format_fingerprint();
|
|
}
|
|
}
|