mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-02-21 20:56:08 +00:00
38 lines
796 B
PHP
38 lines
796 B
PHP
<?php
|
|
|
|
namespace SuiteCRM\Exception;
|
|
|
|
use Psr\Log\LogLevel;
|
|
use SuiteCRM\Test\SuitePHPUnitFrameworkTestCase;
|
|
|
|
class ExceptionTest extends SuitePHPUnitFrameworkTestCase
|
|
{
|
|
/**#
|
|
* @var Exception $exception
|
|
*/
|
|
private static $exception;
|
|
|
|
public function setUp()
|
|
{
|
|
parent::setUp();
|
|
if (self::$exception === null) {
|
|
self::$exception = new Exception();
|
|
}
|
|
}
|
|
|
|
public function testGetDetail()
|
|
{
|
|
$this->assertEquals(
|
|
'SuiteCRM has encountered an exception which has not been handled',
|
|
self::$exception->getDetail()
|
|
);
|
|
}
|
|
|
|
public function testGetLogLevel()
|
|
{
|
|
$this->assertEquals(
|
|
LogLevel::CRITICAL,
|
|
self::$exception->getLogLevel()
|
|
);
|
|
}
|
|
}
|