File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -161,16 +161,6 @@ final public function __clone()
161161 * Serialization is not allowed right now. It is not possible to properly serialize the singleton.
162162 * See the documentation for workaround.
163163 */
164- final public function __sleep ()
165- {
166- throw new EnumerationException ('Enum serialization is not allowed ' );
167- }
168-
169- final public function __wakeup ()
170- {
171- throw new EnumerationException ('Enum unserialization is not allowed ' );
172- }
173-
174164 final public function __serialize ()
175165 {
176166 throw new EnumerationException ('Enum serialization is not allowed ' );
Original file line number Diff line number Diff line change @@ -97,12 +97,12 @@ public function testSerialization()
9797 public function testUnserialization ()
9898 {
9999 Flag::initialize ();
100+ $ this ->expectException (EnumerationException::class);
100101 if (version_compare (PHP_VERSION , '7.4.0-dev ' , '< ' )) {
101- $ this -> expectException (Warning::class );
102+ unserialize ( ' C:40:"Dbalabka \\ Enumeration \\ Tests \\ Fixtures \\ Flag":24:{a:1:{s:7:"ordinal";i:2;}} ' );
102103 } else {
103- $ this -> expectException (EnumerationException::class );
104+ unserialize ( ' O:40:"Dbalabka \\ Enumeration \\ Tests \\ Fixtures \\ Flag":1:{s:7:"ordinal";i:2;} ' );
104105 }
105- unserialize ('O:40:"Dbalabka\Enumeration\Tests\Fixtures\Flag":2:{s:51:" Dbalabka\Enumeration\Tests\Fixtures\Flag flagValue";i:2;s:10:" * ordinal";i:1;} ' );
106106 }
107107
108108 public function testClone ()
You can’t perform that action at this time.
0 commit comments