File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -105,11 +105,13 @@ public function getActivitylogOptions(): LogOptions
105
105
106
106
$ this ->assertCount (2 , $ activityItems );
107
107
108
- $ this ->assertTrue ($ activityItems ->every (fn (Activity $ item ) => $ item ->event === 'created ' &&
108
+ $ this ->assertTrue ($ activityItems ->every (fn (Activity $ item ): bool => $ item ->event === 'created ' &&
109
109
$ item ->description === 'created ' &&
110
- get_class ($ this ->article ) === $ item ->subject_type ));
110
+ get_class ($ this ->article ) === $ item ->subject_type &&
111
+ in_array ($ item ->subject_id , [$ article ->id , $ replicatedArticle ->id ])));
111
112
112
- $ this ->assertEquals ($ replicatedArticle ->id , $ this ->getLastActivity ()->subject_id );
113
+ $ this ->assertEquals ($ article ->id , $ activityItems ->first ()->subject_id );
114
+ $ this ->assertEquals ($ replicatedArticle ->id , $ activityItems ->last ()->subject_id );
113
115
});
114
116
115
117
it ('will log the deletion of a model without softdeletes ' , function () {
You can’t perform that action at this time.
0 commit comments