]> git.mxchange.org Git - friendica.git/blobdiff - tests/datasets/api.fixture.php
[Tests] Add test for Module\Api\Twitter\ContactEndpoint
[friendica.git] / tests / datasets / api.fixture.php
index 475fa03854a06fb9edd1243e0cac8f9429f5c717..8bdb86892672ce71108732d44feda9cf8e86e729 100644 (file)
@@ -1,4 +1,23 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 return [
        // Empty these tables
@@ -8,7 +27,7 @@ return [
        'photo',
        'workerqueue',
        'mail',
-       'item-delivery-data',
+       'post-delivery-data',
        // Base test config to avoid notice messages
        'config'  => [
                [
@@ -80,10 +99,82 @@ return [
                        'rel'     => 2,
                        'network' => 'dfrn',
                ],
+               [
+                       'id'      => 45,
+                       'uid'     => 0,
+                       'name'    => 'Friend contact',
+                       'nick'    => 'friendcontact',
+                       'self'    => 0,
+                       'nurl'    => 'http://localhost/profile/friendcontact',
+                       'url'     => 'http://localhost/profile/friendcontact',
+                       'pending' => 0,
+                       'blocked' => 0,
+                       'rel'     => 2,
+                       'network' => 'dfrn',
+               ],
+               [
+                       'id'      => 46,
+                       'uid'     => 42,
+                       'name'    => 'Mutual contact',
+                       'nick'    => 'mutualcontact',
+                       'self'    => 0,
+                       'nurl'    => 'http://localhost/profile/mutualcontact',
+                       'url'     => 'http://localhost/profile/mutualcontact',
+                       'pending' => 0,
+                       'blocked' => 0,
+                       'rel'     => 3,
+                       'network' => 'dfrn',
+               ],
+               [
+                       'id'      => 47,
+                       'uid'     => 0,
+                       'name'    => 'Mutual contact',
+                       'nick'    => 'mutualcontact',
+                       'self'    => 0,
+                       'nurl'    => 'http://localhost/profile/mutualcontact',
+                       'url'     => 'http://localhost/profile/mutualcontact',
+                       'pending' => 0,
+                       'blocked' => 0,
+                       'rel'     => 2,
+                       'network' => 'dfrn',
+               ],
+       ],
+       'item-uri'    => [
+               [
+                       'id'   => 1,
+                       'uri'  => '1',
+                       'guid' => '1',
+               ],
+               [
+                       'id'   => 2,
+                       'uri'  => '2',
+                       'guid' => '2',
+               ],
+               [
+                       'id'   => 3,
+                       'uri'  => '3',
+                       'guid' => '3',
+               ],
+               [
+                       'id'   => 4,
+                       'uri'  => '4',
+                       'guid' => '4',
+               ],
+               [
+                       'id'   => 5,
+                       'uri'  => '5',
+                       'guid' => '5',
+               ],
+               [
+                       'id'   => 6,
+                       'uri'  => '6',
+                       'guid' => '6',
+               ],
        ],
        'item'    => [
                [
                        'id'          => 1,
+                       'uri-id'      => 1,
                        'visible'     => 1,
                        'contact-id'  => 42,
                        'author-id'   => 42,
@@ -104,6 +195,7 @@ return [
                ],
                [
                        'id'          => 2,
+                       'uri-id'      => 2,
                        'visible'     => 1,
                        'contact-id'  => 42,
                        'author-id'   => 42,
@@ -121,6 +213,7 @@ return [
                [
 
                        'id'          => 3,
+                       'uri-id'      => 3,
                        'visible'     => 1,
                        'contact-id'  => 43,
                        'author-id'   => 43,
@@ -137,6 +230,7 @@ return [
                ],
                [
                        'id'          => 4,
+                       'uri-id'      => 4,
                        'visible'     => 1,
                        'contact-id'  => 44,
                        'author-id'   => 44,
@@ -154,6 +248,7 @@ return [
                [
 
                        'id'          => 5,
+                       'uri-id'      => 5,
                        'visible'     => 1,
                        'contact-id'  => 42,
                        'author-id'   => 42,
@@ -174,6 +269,7 @@ return [
                ],
                [
                        'id'          => 6,
+                       'uri-id'      => 6,
                        'visible'     => 1,
                        'contact-id'  => 44,
                        'author-id'   => 44,
@@ -189,9 +285,29 @@ return [
                        'origin'      => 1,
                ],
        ],
+       'notify' => [
+               [
+                       'id' => 1,
+                       'type' => 8,
+                       'name' => 'Reply to',
+                       'url' => 'http://localhost/display/1',
+                       'photo' => 'http://localhost/',
+                       'date' => '2020-01-01 12:12:02',
+                       'msg' => 'A test reply from an item',
+                       'uid' => 42,
+                       'link' => 'http://localhost/notification/1',
+                       'iid' => 4,
+                       'seen' => 0,
+                       'verb' => '',
+                       'otype' => 'item',
+                       'name_cache' => 'Reply to',
+                       'msg_cache' => 'A test reply from an item',
+               ],
+       ],
        'thread'  => [
                [
                        'iid'        => 1,
+                       'uri-id'     => 1,
                        'visible'    => 1,
                        'contact-id' => 42,
                        'author-id'  => 42,
@@ -201,6 +317,7 @@ return [
                ],
                [
                        'iid'        => 3,
+                       'uri-id'     => 3,
                        'visible'    => 1,
                        'contact-id' => 43,
                        'author-id'  => 43,
@@ -210,6 +327,7 @@ return [
                ],
                [
                        'iid'        => 6,
+                       'uri-id'     => 6,
                        'visible'    => 1,
                        'contact-id' => 44,
                        'author-id'  => 44,
@@ -218,6 +336,12 @@ return [
                        'wall'       => 1,
                ],
        ],
+       'profile' => [
+               [
+                       'id' => 1,
+                       'uid' => 42,
+               ],
+       ],
        'group'   => [
                [
                        'id'      => 1,