From 09c2f424be74b51cadf30de28c3cea42a80a53c4 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 5 Feb 2021 07:27:15 +0000 Subject: [PATCH] More test data --- tests/datasets/api.fixture.php | 160 +++++++++++++++++++++++++++++++++ tests/legacy/ApiTest.php | 2 +- 2 files changed, 161 insertions(+), 1 deletion(-) diff --git a/tests/datasets/api.fixture.php b/tests/datasets/api.fixture.php index b30da447c3..8a683da958 100644 --- a/tests/datasets/api.fixture.php +++ b/tests/datasets/api.fixture.php @@ -529,6 +529,166 @@ return [ 'origin' => 1, 'guid' => '6', ], + [ + 'id' => 7, + 'uri-id' => 1, + 'uri' => '1', + 'visible' => 1, + 'contact-id' => 42, + 'author-id' => 42, + 'owner-id' => 42, + 'causer-id' => 42, + 'uid' => 0, + 'verb' => 'http://activitystrea.ms/schema/1.0/post', + 'unseen' => 1, + 'parent' => 7, + 'parent-uri-id' => 1, + 'parent-uri' => '1', + 'thr-parent-id' => 1, + 'thr-parent' => '1', + 'private' => Item::PUBLIC, + 'gravity' => GRAVITY_PARENT, + 'author-link' => 'http://localhost/profile/selfcontact', + 'wall' => 0, + 'starred' => 1, + 'origin' => 0, + 'allow_cid' => '', + 'allow_gid' => '', + 'deny_cid' => '', + 'deny_gid' => '', + 'guid' => '1', + ], + [ + 'id' => 8, + 'uri-id' => 2, + 'uri' => '2', + 'visible' => 1, + 'contact-id' => 42, + 'author-id' => 42, + 'owner-id' => 42, + 'causer-id' => 42, + 'uid' => 0, + 'verb' => 'http://activitystrea.ms/schema/1.0/post', + 'unseen' => 0, + 'parent' => 7, + 'parent-uri-id' => 1, + 'parent-uri' => '1', + 'thr-parent-id' => 1, + 'thr-parent' => '1', + 'private' => Item::PUBLIC, + 'gravity' => GRAVITY_COMMENT, + 'author-link' => 'http://localhost/profile/selfcontact', + 'wall' => 0, + 'starred' => 0, + 'origin' => 0, + 'guid' => '2', + ], + [ + 'id' => 9, + 'uri-id' => 3, + 'uri' => '3', + 'visible' => 1, + 'contact-id' => 43, + 'author-id' => 43, + 'owner-id' => 42, + 'causer-id' => 43, + 'uid' => 0, + 'verb' => 'http://activitystrea.ms/schema/1.0/post', + 'unseen' => 0, + 'parent' => 9, + 'parent-uri-id' => 3, + 'parent-uri' => '3', + 'thr-parent-id' => 3, + 'thr-parent' => '3', + 'private' => Item::PUBLIC, + 'gravity' => GRAVITY_PARENT, + 'author-link' => 'http://localhost/profile/othercontact', + 'wall' => 0, + 'starred' => 0, + 'origin' => 0, + 'guid' => '3', + ], + [ + 'id' => 10, + 'uri-id' => 4, + 'uri' => '4', + 'visible' => 1, + 'contact-id' => 44, + 'author-id' => 44, + 'owner-id' => 42, + 'causer-id' => 44, + 'uid' => 0, + 'verb' => 'http://activitystrea.ms/schema/1.0/post', + 'unseen' => 0, + 'body' => 'Friend user reply', + 'parent' => 7, + 'parent-uri-id' => 1, + 'parent-uri' => '1', + 'thr-parent-id' => 1, + 'thr-parent' => '1', + 'private' => Item::PUBLIC, + 'gravity' => GRAVITY_COMMENT, + 'author-link' => 'http://localhost/profile/othercontact', + 'wall' => 0, + 'starred' => 0, + 'origin' => 0, + 'guid' => '4', + ], + [ + + 'id' => 11, + 'uri-id' => 5, + 'uri' => '5', + 'visible' => 1, + 'contact-id' => 42, + 'author-id' => 42, + 'owner-id' => 42, + 'causer-id' => 42, + 'uid' => 0, + 'verb' => 'http://activitystrea.ms/schema/1.0/post', + 'unseen' => 0, + 'parent' => 7, + 'parent-uri-id' => 1, + 'parent-uri' => '1', + 'thr-parent-id' => 1, + 'thr-parent' => '1', + 'private' => Item::PUBLIC, + 'gravity' => GRAVITY_COMMENT, + 'author-link' => 'http://localhost/profile/othercontact', + 'wall' => 0, + 'starred' => 0, + 'origin' => 1, + 'allow_cid' => '', + 'allow_gid' => '', + 'deny_cid' => '', + 'deny_gid' => '', + 'guid' => '5', + ], + [ + 'id' => 12, + 'uri-id' => 6, + 'uri' => '6', + 'visible' => 1, + 'contact-id' => 44, + 'author-id' => 44, + 'owner-id' => 42, + 'causer-id' => 44, + 'uid' => 0, + 'verb' => 'http://activitystrea.ms/schema/1.0/post', + 'unseen' => 0, + 'parent' => 12, + 'parent-uri-id' => 6, + 'parent-uri' => '6', + 'thr-parent-id' => 6, + 'thr-parent' => '6', + 'private' => Item::PUBLIC, + 'gravity' => GRAVITY_PARENT, + 'author-link' => 'http://localhost/profile/othercontact', + 'wall' => 0, + 'starred' => 0, + 'origin' => 0, + 'guid' => '6', + ], ], 'notify' => [ [ diff --git a/tests/legacy/ApiTest.php b/tests/legacy/ApiTest.php index 14d925b527..265f502f0a 100644 --- a/tests/legacy/ApiTest.php +++ b/tests/legacy/ApiTest.php @@ -1746,7 +1746,7 @@ class ApiTest extends FixtureTest { $_REQUEST['page'] = -2; $result = api_statuses_networkpublic_timeline('json'); - self::assertNotEmpty($result['status'], var_export($result, true)); + self::assertNotEmpty($result['status']); foreach ($result['status'] as $status) { self::assertStatus($status); }