From 8808195a804087e99065ab0a1e18f20ef98e268e Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Wed, 23 Mar 2022 13:13:51 +0000 Subject: [PATCH] [PLUGIN][ActivityPub][Test] Test @language handling --- .../Test/Fixtures/gnusocial/activities/create_note.jsonld | 3 +++ .../Test/Fixtures/gnusocial/activities/create_page.jsonld | 3 --- .../Test/Fixtures/gnusocial/activities/like_note.jsonld | 2 +- .../ActivityPub/Test/Fixtures/gnusocial/objects/page.jsonld | 3 --- plugins/ActivityPub/Test/Objects/GSObjectPageTest.php | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/create_note.jsonld b/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/create_note.jsonld index 7a26e9c0b9..a67f293eaf 100755 --- a/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/create_note.jsonld +++ b/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/create_note.jsonld @@ -17,6 +17,9 @@ "@id": "gs:inConversation", "@type": "@id" } + }, + { + "@language": "en" } ], "id": "https://instance.gnusocial.test/activity/1337", diff --git a/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/create_page.jsonld b/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/create_page.jsonld index a430c25218..2ce600cf7b 100755 --- a/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/create_page.jsonld +++ b/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/create_page.jsonld @@ -17,9 +17,6 @@ "@id": "gs:inConversation", "@type": "@id" } - }, - { - "@language": "en" } ], "id": "https://instance.gnusocial.test/activity/1338", diff --git a/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/like_note.jsonld b/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/like_note.jsonld index e73042be2c..5abe0008b4 100644 --- a/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/like_note.jsonld +++ b/plugins/ActivityPub/Test/Fixtures/gnusocial/activities/like_note.jsonld @@ -12,5 +12,5 @@ "cc": [ "https://instance.gnusocial.test/actor/42" ], - "object": "https://ds9.lemmy.ml/post/11202" + "object": "https://instance.gnusocial.test/object/note/1337" } \ No newline at end of file diff --git a/plugins/ActivityPub/Test/Fixtures/gnusocial/objects/page.jsonld b/plugins/ActivityPub/Test/Fixtures/gnusocial/objects/page.jsonld index 981cb0539f..c82325d077 100755 --- a/plugins/ActivityPub/Test/Fixtures/gnusocial/objects/page.jsonld +++ b/plugins/ActivityPub/Test/Fixtures/gnusocial/objects/page.jsonld @@ -17,9 +17,6 @@ "@id": "gs:inConversation", "@type": "@id" } - }, - { - "@language": "en" } ], "id": "https://instance.gnusocial.test/object/note/1338", diff --git a/plugins/ActivityPub/Test/Objects/GSObjectPageTest.php b/plugins/ActivityPub/Test/Objects/GSObjectPageTest.php index 5b242a780b..1555228998 100644 --- a/plugins/ActivityPub/Test/Objects/GSObjectPageTest.php +++ b/plugins/ActivityPub/Test/Objects/GSObjectPageTest.php @@ -51,7 +51,7 @@ class GSObjectPageTest extends GNUsocialTestCase static::assertFalse($page->getIsLocal()); static::assertSame(VisibilityScope::EVERYWHERE, $page->getScope()); static::assertSame($object_uri, $page->getUrl()); - static::assertSame('en', $page->getLanguageLocale()); + static::assertNull($page->getLanguageLocale()); static::assertSame('page', $page->getType()); static::assertSame('hello, world.', $page->getTitle());