mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-03 06:44:03 +01:00
25 lines
681 B
PHP
25 lines
681 B
PHP
<?php
|
|
|
|
class Enigma_EnigmaError extends PHPUnit\Framework\TestCase
|
|
{
|
|
static function setUpBeforeClass(): void
|
|
{
|
|
include_once __DIR__ . '/../lib/enigma_error.php';
|
|
}
|
|
|
|
/**
|
|
* Test constructor
|
|
*/
|
|
function test_constructor()
|
|
{
|
|
$error = new enigma_error(enigma_error::EXPIRED, 'message', ['test1' => 'test2']);
|
|
|
|
$this->assertInstanceOf('enigma_error', $error);
|
|
$this->assertSame(enigma_error::EXPIRED, $error->getCode());
|
|
$this->assertSame('message', $error->getMessage());
|
|
$this->assertSame('test2', $error->getData('test1'));
|
|
$this->assertSame(['test1' => 'test2'], $error->getData());
|
|
}
|
|
}
|
|
|