Skip to content

Commit 15f4e3d

Browse files
committed
Add carbon immutable test
1 parent 2121637 commit 15f4e3d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/SerializerTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,19 @@ function () {
414414
expect($r)->toEqual($carbon);
415415
})->with('serializers');
416416

417+
test('serializes carbon immutable objects', function () {
418+
$carbon = new \Carbon\CarbonImmutable('now');
419+
420+
$closure = function () use ($carbon) {
421+
return $carbon;
422+
};
423+
424+
$u = s($closure);
425+
$r = $u();
426+
427+
expect($r)->toEqual($carbon);
428+
})->with('serializers');
429+
417430
class A
418431
{
419432
protected static function aStaticProtected()

0 commit comments

Comments
 (0)