File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -250,4 +250,23 @@ public function testEqualsConflictValues()
250
250
{
251
251
$ this ->assertFalse (EnumFixture::FOO ()->equals (EnumConflict::FOO ()));
252
252
}
253
+
254
+ public function testSerialize ()
255
+ {
256
+ $ this ->assertEquals (
257
+ '4f3a33303a224d79434c6162735c54657374735c456e756d5c456e756d46697874757265223a313a7b733a383a22002a0076616c7565223b733a333a22666f6f223b7d ' ,
258
+ bin2hex (serialize (EnumFixture::FOO ()))
259
+ );
260
+ }
261
+
262
+ public function testUnserialize ()
263
+ {
264
+ /* @var $value EnumFixture */
265
+ $ value = unserialize (hex2bin (
266
+ '4f3a33303a224d79434c6162735c54657374735c456e756d5c456e756d46697874757265223a313a7b733a383a22002a0076616c7565223b733a333a22666f6f223b7d '
267
+ ));
268
+
269
+ $ this ->assertEquals (EnumFixture::FOO , $ value ->getValue ());
270
+ $ this ->assertTrue (EnumFixture::FOO ()->equals ($ value ));
271
+ }
253
272
}
You can’t perform that action at this time.
0 commit comments