You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test('serialization string content dont change', function () {
345
+
test('serializable closure serialization string content dont change', function () {
334
346
$a = 100;
335
347
336
348
SerializableClosure::setSecretKey('foo');
@@ -349,16 +361,41 @@ function () {
349
361
);
350
362
});
351
363
364
+
test('unsigned serializable closure serialization string content dont change', function () {
365
+
$a = 100;
366
+
367
+
SerializableClosure::setSecretKey('foo');
368
+
369
+
$c = SerializableClosure::unsigned(function () use ($a) {
370
+
return$a;
371
+
});
372
+
373
+
$actual = explode('s:32:', serialize($c))[0];
374
+
375
+
expect($actual)->toBe(<<<OEF
376
+
O:55:"Laravel\SerializableClosure\UnsignedSerializableClosure":1:{s:12:"serializable";O:46:"Laravel\SerializableClosure\Serializers\Native":5:{s:3:"use";a:1:{s:1:"a";i:100;}s:8:"function";s:47:"function () use (\$a) {
0 commit comments