smeserver-dmarc-srg/root/opt/dmarc-srg/tests/classes/Exception/RuntimeExceptionTest.php

17 lines
495 B
PHP
Raw Normal View History

2023-06-21 15:19:40 +02:00
<?php
namespace Liuch\DmarcSrg;
use Liuch\DmarcSrg\Exception\RuntimeException;
class RuntimeExceptionTest extends \PHPUnit\Framework\TestCase
{
public function testExceptionCode(): void
{
$this->assertSame(-1, (new RuntimeException())->getCode());
$this->assertSame(0, (new RuntimeException('', 0))->getCode());
$this->assertSame(-1, (new RuntimeException('', -1))->getCode());
$this->assertSame(77, (new RuntimeException('', 77))->getCode());
}
}