[PLUGIN][ActivityPub][TESTS] Replace invalid URL in fixtures
This commit is contained in:
parent
2df30e2987
commit
97114e38e0
@ -3,9 +3,9 @@
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams"
|
||||
],
|
||||
"id": "https://another_instance.gnusocial.test/activity/41362",
|
||||
"id": "https://another-instance.gnusocial.test/activity/41362",
|
||||
"published": "2022-03-20T17:54:15+00:00",
|
||||
"actor": "https://another_instance.gnusocial.test/actor/43",
|
||||
"actor": "https://another-instance.gnusocial.test/actor/43",
|
||||
"to": [
|
||||
"https://www.w3.org/ns/activitystreams#Public"
|
||||
],
|
||||
|
@ -20,23 +20,23 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": "https://another_instance.gnusocial.test/actor/43",
|
||||
"inbox": "https://another_instance.gnusocial.test/actor/43/inbox.json",
|
||||
"outbox": "https://another_instance.gnusocial.test/actor/43/outbox.json",
|
||||
"following": "https://another_instance.gnusocial.test/actor/43/subscriptions",
|
||||
"followers": "https://another_instance.gnusocial.test/actor/43/subscribers",
|
||||
"liked": "https://another_instance.gnusocial.test/actor/43/favourites",
|
||||
"id": "https://another-instance.gnusocial.test/actor/43",
|
||||
"inbox": "https://another-instance.gnusocial.test/actor/43/inbox.json",
|
||||
"outbox": "https://another-instance.gnusocial.test/actor/43/outbox.json",
|
||||
"following": "https://another-instance.gnusocial.test/actor/43/subscriptions",
|
||||
"followers": "https://another-instance.gnusocial.test/actor/43/subscribers",
|
||||
"liked": "https://another-instance.gnusocial.test/actor/43/favourites",
|
||||
"preferredUsername": "alice",
|
||||
"publicKey": {
|
||||
"id": "https://another_instance.gnusocial.test/actor/43#public-key",
|
||||
"owner": "https://another_instance.gnusocial.test/actor/43",
|
||||
"id": "https://another-instance.gnusocial.test/actor/43#public-key",
|
||||
"owner": "https://another-instance.gnusocial.test/actor/43",
|
||||
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArRHP8lxqj1HqFL4q7CKh\noDyBvuhoaoWo/AGdjiWu5AEODL6utaQX+bCJApH9+XNICCkWvayKupgOvLPqBxkh\nl4TPUjlb1iCt+iZeMB8ftude4epaUNUDdqK1zG3g8z8AdF3nx9/cHI+8UY7+JAh6\naZ5EBi+wNYtl4UoDfizmLeRmmGIam5UQ6x2RseYCevIm1BBCZZHLdIaoPJphyjLW\n8sRJtHL4D3m28NkGG8GizctXHbMl7+RlVJ8HyQSr5taRMF+CmZ9ZDFqF2ewc9Pmw\nOMG4o/6m50Q2ELz23O8idjGxKgG7iGdEa3c5cQZTCQ0+2N77L+iS029AV9AKyZMi\nCwIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
},
|
||||
"name": "Alice P. Hacker",
|
||||
"published": "2022-02-23T17:20:30+00:00",
|
||||
"updated": "2022-02-25T02:12:48+00:00",
|
||||
"url": "https://another_instance.gnusocial.test/@alice",
|
||||
"url": "https://another-instance.gnusocial.test/@alice",
|
||||
"endpoints": {
|
||||
"sharedInbox": "https://another_instance.gnusocial.test/inbox.json"
|
||||
"sharedInbox": "https://another-instance.gnusocial.test/inbox.json"
|
||||
}
|
||||
}
|
@ -25,7 +25,7 @@
|
||||
"id": "https://instance.gnusocial.test/object/note/1340",
|
||||
"published": "2022-03-16T21:54:43+00:00",
|
||||
"attributedTo": "https://instance.gnusocial.test/actor/42",
|
||||
"content": "<p>This is a public root note with a mention to @<span class=\"h-card\"><a href=\"https://another_instance.gnusocial.test/actor/43\" class=\"h-card u-url p-nickname mention\">alice@another_instance.gnusocial.test</a></span>.</p>",
|
||||
"content": "<p>This is a public root note with a mention to @<span class=\"h-card\"><a href=\"https://another-instance.gnusocial.test/actor/43\" class=\"h-card u-url p-nickname mention\">alice@another_instance.gnusocial.test</a></span>.</p>",
|
||||
"mediaType": "text/html",
|
||||
"source": {
|
||||
"content": "This is a public root note with a mention to @alice@another_instance.gnusocial.test.",
|
||||
@ -35,7 +35,7 @@
|
||||
"tag": [
|
||||
{
|
||||
"type": "Mention",
|
||||
"href": "https://another_instance.gnusocial.test/actor/43",
|
||||
"href": "https://another-instance.gnusocial.test/actor/43",
|
||||
"name": "@alice@another_instance.gnusocial.test"
|
||||
}
|
||||
],
|
||||
|
@ -68,7 +68,7 @@ class GSObjectNoteTest extends GNUsocialTestCase
|
||||
self::bootKernel();
|
||||
|
||||
$actor_uri = 'https://instance.gnusocial.test/actor/42';
|
||||
$another_actor_uri = 'https://another_instance.gnusocial.test/actor/43';
|
||||
$another_actor_uri = 'https://another-instance.gnusocial.test/actor/43';
|
||||
$object_uri = 'https://instance.gnusocial.test/object/note/1340';
|
||||
$note = ActivityPub::getObjectByUri($object_uri, try_online: false);
|
||||
static::assertInstanceOf(Note::class, $note);
|
||||
@ -77,7 +77,7 @@ class GSObjectNoteTest extends GNUsocialTestCase
|
||||
static::assertSame('text/plain', $note->getContentType());
|
||||
static::assertSame('This is a public root note with a mention to @alice@another_instance.gnusocial.test.', $note->getContent());
|
||||
// TODO: implement proper sanitization rules
|
||||
//static::assertSame('<p>This is a public root note with a mention to @<span class=\"h-card\"><a href=\"https://another_instance.gnusocial.test/actor/43\" class=\"h-card u-url p-nickname mention\">alice@another_instance.gnusocial.test</a></span>.</p>', $note->getRendered());
|
||||
//static::assertSame('<p>This is a public root note with a mention to @<span class=\"h-card\"><a href=\"https://another-instance.gnusocial.test/actor/43\" class=\"h-card u-url p-nickname mention\">alice@another_instance.gnusocial.test</a></span>.</p>', $note->getRendered());
|
||||
static::assertSame('ActivityPub', $note->getSource());
|
||||
static::assertNull($note->getReplyTo());
|
||||
static::assertFalse($note->getIsLocal());
|
||||
|
Loading…
Reference in New Issue
Block a user