File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,6 @@ protected function isValueAnEnum($value): bool
34
34
35
35
$ enumNamespace = is_object ($ value ) ? get_class ($ value ) : $ value ;
36
36
37
- return ! is_array ($ value ) && enum_exists ($ enumNamespace );
37
+ return ! is_array ($ value ) && is_string ( $ enumNamespace ) && enum_exists ($ enumNamespace );
38
38
}
39
39
}
Original file line number Diff line number Diff line change 148
148
expect ($ firstActivity ->getExtraProperty ('property.subProperty ' ))->toEqual ('value ' );
149
149
});
150
150
151
+ it ('can log activity with null properties ' , function () {
152
+ $ properties = [
153
+ 'property ' => null ,
154
+ ];
155
+
156
+ activity ()
157
+ ->withProperties ($ properties )
158
+ ->log ($ this ->activityDescription );
159
+
160
+ $ firstActivity = Activity::first ();
161
+
162
+ expect ($ firstActivity ->properties )->toBeInstanceOf (Collection::class);
163
+ expect ($ firstActivity ->getExtraProperty ('property ' ))->toBeNull ();
164
+ });
165
+
151
166
it ('can log activity with a single properties ' , function () {
152
167
activity ()
153
168
->withProperty ('key ' , 'value ' )
You can’t perform that action at this time.
0 commit comments