diff --git a/tests/Unit/ActivityPub/AcceptVerbTest.php b/tests/Unit/ActivityPub/AcceptVerbTest.php deleted file mode 100644 index c949624db..000000000 --- a/tests/Unit/ActivityPub/AcceptVerbTest.php +++ /dev/null @@ -1,55 +0,0 @@ -validAccept = [ - '@context' => 'https://www.w3.org/ns/activitystreams', - 'id' => 'https://example.org/og/b3e4a40b-0b26-4c5a-9079-094bd633fab7', - 'type' => 'Accept', - 'actor' => 'https://example.org/u/alice', - 'object' => [ - 'id' => 'https://example.net/u/bob#follows/bb27f601-ddb9-4567-8f16-023d90605ca9', - 'type' => 'Follow', - 'actor' => 'https://example.net/u/bob', - 'object' => 'https://example.org/u/alice' - ] - ]; - $this->invalidAccept = [ - '@context' => 'https://www.w3.org/ns/activitystreams', - 'id' => 'https://example.org/og/b3e4a40b-0b26-4c5a-9079-094bd633fab7', - 'type' => 'Accept2', - 'actor' => 'https://example.org/u/alice', - 'object' => [ - 'id' => 'https://example.net/u/bob#follows/bb27f601-ddb9-4567-8f16-023d90605ca9', - 'type' => 'Follow', - 'actor' => 'https://example.net/u/bob', - 'object' => 'https://example.org/u/alice' - ] - ]; - } - - /** @test */ - public function basic_accept() - { - $this->assertTrue(Accept::validate($this->validAccept)); - } - - /** @test */ - public function invalid_accept() - { - $this->assertFalse(Accept::validate($this->invalidAccept)); - } -} diff --git a/tests/Unit/ActivityPub/AudienceScopeTest.php b/tests/Unit/ActivityPub/AudienceScopeTest.php index c7287fa1d..5ff125f1d 100644 --- a/tests/Unit/ActivityPub/AudienceScopeTest.php +++ b/tests/Unit/ActivityPub/AudienceScopeTest.php @@ -9,7 +9,7 @@ use App\Util\ActivityPub\Helpers; class AudienceScopeTest extends TestCase { - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/ActivityPub/NoteAttachmentTest.php b/tests/Unit/ActivityPub/NoteAttachmentTest.php index 7a715a285..e69539235 100644 --- a/tests/Unit/ActivityPub/NoteAttachmentTest.php +++ b/tests/Unit/ActivityPub/NoteAttachmentTest.php @@ -10,10 +10,10 @@ use Illuminate\Foundation\Testing\RefreshDatabase; class NoteAttachmentTest extends TestCase { - public function setUp() + public function setUp(): void { parent::setUp(); - $this->pleroma = json_decode('{"@context":"https://www.w3.org/ns/activitystreams","actor":"https://pleroma.site/users/pixeldev","cc":["https://pleroma.site/users/pixeldev/followers"],"context":"https://pleroma.site/contexts/cbe919c6-238e-4e5d-9065-fcb3c312b56a","context_id":8651628,"id":"https://pleroma.site/activities/65b2c43f-f33e-438e-b141-4e2047b43012","object":{"actor":"https://pleroma.site/users/pixeldev","announcement_count":2,"announcements":["https://playvicious.social/users/jalcine","https://mastodon.social/users/dansup"],"attachment":[{"mediaType":"image/png","name":"Screen Shot 2018-09-08 at 10.59.38 PM.png","type":"Document","url":"https://s3.wasabisys.com/pleroma-site/1c49e1f9-1187-404d-a063-1b37ecec44e9/Screen Shot 2018-09-08 at 10.59.38 PM.png"},{"mediaType":"image/jpeg","name":"archer-danger-zone.jpg","type":"Document","url":"https://s3.wasabisys.com/pleroma-site/cd70cdb6-0148-4dcb-bac6-11fd4aa59834/archer-danger-zone.jpg"}],"attributedTo":"https://pleroma.site/users/pixeldev","cc":["https://pleroma.site/users/pixeldev/followers"],"content":"New middleware for specific actions, acts like sudo requiring periodic password verification. #dangerZone","context":"https://pleroma.site/contexts/cbe919c6-238e-4e5d-9065-fcb3c312b56a","context_id":8651628,"conversation":"https://pleroma.site/contexts/cbe919c6-238e-4e5d-9065-fcb3c312b56a","emoji":{},"id":"https://pleroma.site/objects/b7576ec9-ae2b-4076-a426-0d8a65b23876","like_count":6,"likes":["https://crazynoisybizarre.town/users/jusdepatate","https://social.chinwag.org/users/rolaveric","https://norden.social/users/ReneHenrich","https://mastodon.ketchupma.io/users/KazukyAkayashi","https://chaos.social/users/lutoma","https://playvicious.social/users/jalcine"],"published":"2018-09-09T05:05:53.763752Z","sensitive":false,"summary":"","tag":[{"href":"https://pleroma.site/tags/dangerzone","name":"#dangerzone","type":"Hashtag"}],"to":["https://www.w3.org/ns/activitystreams#Public"],"type":"Note"},"published":"2018-09-09T05:05:53.749866Z","to":["https://www.w3.org/ns/activitystreams#Public"],"type":"Create"}', true, 9); + $this->pleroma = json_decode('{"@context":"https://www.w3.org/ns/activitystreams","actor":"https://pleroma.site/users/pixeldev","cc":["https://pleroma.site/users/pixeldev/followers"],"context":"https://pleroma.site/contexts/cbe919c6-238e-4e5d-9065-fcb3c312b56a","context_id":8651628,"id":"https://pleroma.site/activities/65b2c43f-f33e-438e-b141-4e2047b43012","object":{"actor":"https://pleroma.site/users/pixeldev","announcement_count":2,"announcements":["https://playvicious.social/users/jalcine","https://mastodon.social/users/dansup"],"attachment":[{"mediaType":"image/png","name":"Screen Shot 2018-09-08 at 10.59.38 PM.png","type":"Document","url":"https://s3.wasabisys.com/pleroma-site/1c49e1f9-1187-404d-a063-1b37ecec44e9/Screen Shot 2018-09-08 at 10.59.38 PM.png"},{"mediaType":"image/jpeg","name":"archer-danger-zone.jpg","type":"Document","url":"https://s3.wasabisys.com/pleroma-site/cd70cdb6-0148-4dcb-bac6-11fd4aa59834/archer-danger-zone.jpg"}],"attributedTo":"https://pleroma.site/users/pixeldev","cc":["https://pleroma.site/users/pixeldev/followers"],"content":"New middleware for specific actions, acts like sudo requiring periodic password verification. #dangerZone","context":"https://pleroma.site/contexts/cbe919c6-238e-4e5d-9065-fcb3c312b56a","context_id":8651628,"conversation":"https://pleroma.site/contexts/cbe919c6-238e-4e5d-9065-fcb3c312b56a","emoji":{},"id":"https://pleroma.site/objects/b7576ec9-ae2b-4076-a426-0d8a65b23876","published":"2018-09-09T05:05:53.763752Z","sensitive":false,"summary":"","tag":[{"href":"https://pleroma.site/tags/dangerzone","name":"#dangerzone","type":"Hashtag"}],"to":["https://www.w3.org/ns/activitystreams#Public"],"type":"Note"},"published":"2018-09-09T05:05:53.749866Z","to":["https://www.w3.org/ns/activitystreams#Public"],"type":"Create"}', true, 9); $this->mastodon = json_decode('{"id":"https://mastodon.social/users/dansup/statuses/100889802384218791/activity","type":"Create","actor":"https://mastodon.social/users/dansup","published":"2018-10-13T18:43:33Z","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://mastodon.social/users/dansup/followers"],"object":{"id":"https://mastodon.social/users/dansup/statuses/100889802384218791","type":"Note","summary":null,"inReplyTo":null,"published":"2018-10-13T18:43:33Z","url":"https://mastodon.social/@dansup/100889802384218791","attributedTo":"https://mastodon.social/users/dansup","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://mastodon.social/users/dansup/followers"],"sensitive":false,"atomUri":"https://mastodon.social/users/dansup/statuses/100889802384218791","inReplyToAtomUri":null,"conversation":"tag:mastodon.social,2018-10-13:objectId=59103420:objectType=Conversation","content":"
Good Morning! #coffee
","contentMap":{"en":"Good Morning! #coffee
"},"attachment":[{"type":"Document","mediaType":"image/jpeg","url":"https://files.mastodon.social/media_attachments/files/007/110/573/original/96a196885a77c9a4.jpg","name":null}],"tag":[{"type":"Hashtag","href":"https://mastodon.social/tags/coffee","name":"#coffee"}]}}', true, 9); diff --git a/tests/Unit/ActivityPub/Verb/AnnounceTest.php b/tests/Unit/ActivityPub/Verb/AnnounceTest.php index c3e739692..7b7eef14b 100644 --- a/tests/Unit/ActivityPub/Verb/AnnounceTest.php +++ b/tests/Unit/ActivityPub/Verb/AnnounceTest.php @@ -10,7 +10,7 @@ use App\Util\ActivityPub\Validator\Announce; class AnnounceTest extends TestCase { - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/Unit/Lexer/StatusLexerTest.php b/tests/Unit/Lexer/StatusLexerTest.php index fbfa15cb7..5b0fe37de 100644 --- a/tests/Unit/Lexer/StatusLexerTest.php +++ b/tests/Unit/Lexer/StatusLexerTest.php @@ -14,7 +14,7 @@ class StatusLexerTest extends TestCase public $entities; public $autolink; - public function setUp() + public function setUp(): void { parent::setUp(); $this->status = "@pixelfed hi, really like the website! #píxelfed"; @@ -60,7 +60,6 @@ class StatusLexerTest extends TestCase public function testAutolink() { $expected = '@pixelfed hi, really like the website! #píxelfed'; - $this->assertEquals($this->autolink, $expected); } }