From 7eddbd343d8cf7b4b0dac9136d39453fb42d3b33 Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Wed, 23 Mar 2022 13:12:39 +0000 Subject: [PATCH] [PLUGIN][ActivityPub][Test] Add Like{Note} fixture --- .../Test/Fixtures/ActivityPubFixtures.php | 3 +++ .../gnusocial/activities/like_note.jsonld | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 plugins/ActivityPub/Test/Fixtures/gnusocial/activities/like_note.jsonld diff --git a/plugins/ActivityPub/Test/Fixtures/ActivityPubFixtures.php b/plugins/ActivityPub/Test/Fixtures/ActivityPubFixtures.php index e4d1f04c8b..44fbe26887 100644 --- a/plugins/ActivityPub/Test/Fixtures/ActivityPubFixtures.php +++ b/plugins/ActivityPub/Test/Fixtures/ActivityPubFixtures.php @@ -63,5 +63,8 @@ class ActivityPubFixtures extends Fixture $create_reply_path = self::fixturesPath('activities/create_reply.jsonld', $ontology); $create_reply = Activity::fromJson(fread(fopen($create_reply_path, 'r'), filesize($create_reply_path))); DB::flush(); + $like_note_path = self::fixturesPath('activities/like_note.jsonld', $ontology); + $like_note = Activity::fromJson(fread(fopen($like_note_path, 'r'), filesize($like_note_path))); + DB::flush(); } } diff --git a/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/like_note.jsonld b/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/like_note.jsonld new file mode 100644 index 0000000000..e73042be2c --- /dev/null +++ b/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/like_note.jsonld @@ -0,0 +1,16 @@ +{ + "type": "Like", + "@context": [ + "https://www.w3.org/ns/activitystreams" + ], + "id": "https://another_instance.gnusocial.test/activity/41362", + "published": "2022-03-20T17:54:15+00:00", + "actor": "https://another_instance.gnusocial.test/actor/43", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://instance.gnusocial.test/actor/42" + ], + "object": "https://ds9.lemmy.ml/post/11202" +} \ No newline at end of file