Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6 System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64 User : User ( 0) PHP Version : 7.4.6 Disable Function : NONE Directory : C:/xampp/phpMyAdmin/vendor/dasprid/enum/test/ |
<?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:{}'); } }