|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /home/matalashes/public_html/kite.mata-lashes.com/vendor/dasprid/enum/test/ |
Upload File : |
<?php
declare(strict_types = 1);
namespace DASPRiD\EnumTest;
use DASPRiD\Enum\Exception\CloneNotSupportedException;
use DASPRiD\Enum\Exception\SerializeNotSupportedException;
use DASPRiD\Enum\Exception\UnserializeNotSupportedException;
use DASPRiD\Enum\NullValue;
use PHPUnit\Framework\TestCase;
final class NullValueTest extends TestCase
{
public function testExceptionOnCloneAttempt() : void
{
$this->expectException(CloneNotSupportedException::class);
clone NullValue::instance();
}
public function testExceptionOnSerializeAttempt() : void
{
$this->expectException(SerializeNotSupportedException::class);
serialize(NullValue::instance());
}
public function testExceptionOnUnserializeAttempt() : void
{
$this->expectException(UnserializeNotSupportedException::class);
unserialize('O:22:"DASPRiD\\Enum\\NullValue":0:{}');
}
}