mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-07 00:26:48 +01:00
* fix Tests\Browser\TestCase imports * fix remaining imports * fix PHPUnit\Framework\TestCase imports * import GuzzleHttp\Client * fix remaining * "php_unit_method_casing" is not todo * fix "single_line_comment_spacing" * fix 2nd commit done using older fixer
26 lines
709 B
PHP
26 lines
709 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class Enigma_EnigmaError extends TestCase
|
|
{
|
|
public static function setUpBeforeClass(): void
|
|
{
|
|
include_once __DIR__ . '/../lib/enigma_error.php';
|
|
}
|
|
|
|
/**
|
|
* Test constructor
|
|
*/
|
|
public 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());
|
|
}
|
|
}
|