Files
roundcubemail/plugins/enigma/tests/EnigmaErrorTest.php
Michael Voříšek 1e360999b2 Use composer autoloader for bundled plugins testing (#9412)
* use fixed "roundcube/plugin-installer"

* Use composer autoloader for plugins testing

* cherrypick remaining from 9241 related with testing

* minor legacy autoload improvements
2024-04-11 18:28:46 +02:00

21 lines
585 B
PHP

<?php
use PHPUnit\Framework\TestCase;
class Enigma_EnigmaError extends TestCase
{
/**
* 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());
}
}