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()
161
161
* Serialization is not allowed right now. It is not possible to properly serialize the singleton.
162
162
* See the documentation for workaround.
163
163
*/
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
-
174
164
final public function __serialize ()
175
165
{
176
166
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()
97
97
public function testUnserialization ()
98
98
{
99
99
Flag::initialize ();
100
+ $ this ->expectException (EnumerationException::class);
100
101
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;}} ' );
102
103
} else {
103
- $ this -> expectException (EnumerationException::class );
104
+ unserialize ( ' O:40:"Dbalabka \\ Enumeration \\ Tests \\ Fixtures \\ Flag":1:{s:7:"ordinal";i:2;} ' );
104
105
}
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;} ' );
106
106
}
107
107
108
108
public function testClone ()
You can’t perform that action at this time.
0 commit comments