php-7.4.27-mk1-mac/lib/php/pear/test/XML_Util/tests/RaiseErrorTests.php

18 lines
448 B
PHP
Raw Permalink Normal View History

2023-04-27 18:29:57 +03:00
<?php
class RaiseErrorTests extends AbstractUnitTests
{
/**
* @covers XML_Util::raiseError()
*/
public function testRaiseError()
{
$code = 12345;
$message = "I am an error";
$error = XML_Util::raiseError($message, $code);
$this->assertInstanceOf('PEAR_Error', $error);
$this->assertEquals($message, $error->getMessage());
$this->assertEquals($code, $error->getCode());
}
}