You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
crmeb_php/vendor/dasprid/enum/test/NullValueTest.php

31 lines
916 B

<?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:{}');
}
}