]> git.mxchange.org Git - friendica.git/commitdiff
Fix the test data / unused function removed
authorMichael <heluecht@pirati.ca>
Sun, 17 Jan 2021 22:20:46 +0000 (22:20 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 17 Jan 2021 22:20:46 +0000 (22:20 +0000)
src/Model/Item.php
tests/datasets/api.fixture.php

index 83f71004e0888cd9ba10ae3392b5d18f5e0fd07b..c8677d8425b347d422064128e7cba6fbd0480433 100644 (file)
@@ -370,31 +370,6 @@ class Item
                return $retval;
        }
 
-       /**
-        * Retrieve a single record from the item table and returns it in an associative array
-        *
-        * @param array $fields
-        * @param array $condition
-        * @param array $params
-        * @return bool|array
-        * @throws \Exception
-        * @see   DBA::select
-        */
-       public static function selectFirst(array $fields = [], array $condition = [], $params = [])
-       {
-               $params['limit'] = 1;
-
-               $result = self::select($fields, $condition, $params);
-
-               if (is_bool($result)) {
-                       return $result;
-               } else {
-                       $row = self::fetch($result);
-                       DBA::close($result);
-                       return $row;
-               }
-       }
-
        /**
         * Select rows from the item table and returns them as an array
         *
index 95c427d7c969ac802a23914d2b70d06a36308d5f..7a0ad6cd44f5b521373fcbf8261b8306d5435a45 100644 (file)
@@ -180,47 +180,49 @@ return [
                ],
        ],
        'item-content' => [
-               'id'          => 1,
-               'uri-id'      => 1,
-               'uri-plink-hash' => '1',
-               'body'        => 'Parent status',
-               'plink'       => 'http://localhost/display/1',
-       ],
-       'item-content' => [
-               'id'          => 2,
-               'uri-id'      => 2,
-               'uri-plink-hash' => '2',
-               'body'        => 'Reply',
-               'plink'       => 'http://localhost/display/2',
-       ],
-       'item-content' => [
-               'id'          => 3,
-               'uri-id'      => 3,
-               'uri-plink-hash' => '3',
-               'body'        => 'Other user status',
-               'plink'       => 'http://localhost/display/3',
-       ],
-       'item-content' => [
-               'id'          => 4,
-               'uri-id'      => 4,
-               'uri-plink-hash' => '4',
-               'body'        => 'Friend user reply',
-               'plink'       => 'http://localhost/display/4',
-       ],
-       'item-content' => [
-               'id'          => 5,
-               'uri-id'      => 5,
-               'uri-plink-hash' => '5',
-               'body'        => '[share]Shared status[/share]',
-               'plink'       => 'http://localhost/display/5',
-       ],
-       'item-content' => [
-               'id'          => 6,
-               'uri-id'      => 6,
-               'uri-plink-hash' => '6',
-               'body'        => 'Friend user status',
-               'plink'       => 'http://localhost/display/6',
-       ],
+               [
+                       'id'          => 1,
+                       'uri-id'      => 1,
+                       'uri-plink-hash' => '1',
+                       'body'        => 'Parent status',
+                       'plink'       => 'http://localhost/display/1',
+               ],
+               [
+                       'id'          => 2,
+                       'uri-id'      => 2,
+                       'uri-plink-hash' => '2',
+                       'body'        => 'Reply',
+                       'plink'       => 'http://localhost/display/2',
+               ],
+               [
+                       'id'          => 3,
+                       'uri-id'      => 3,
+                       'uri-plink-hash' => '3',
+                       'body'        => 'Other user status',
+                       'plink'       => 'http://localhost/display/3',
+               ],
+               [
+                       'id'          => 4,
+                       'uri-id'      => 4,
+                       'uri-plink-hash' => '4',
+                       'body'        => 'Friend user reply',
+                       'plink'       => 'http://localhost/display/4',
+               ],
+               [
+                       'id'          => 5,
+                       'uri-id'      => 5,
+                       'uri-plink-hash' => '5',
+                       'body'        => '[share]Shared status[/share]',
+                       'plink'       => 'http://localhost/display/5',
+               ],
+               [
+                       'id'          => 6,
+                       'uri-id'      => 6,
+                       'uri-plink-hash' => '6',
+                       'body'        => 'Friend user status',
+                       'plink'       => 'http://localhost/display/6',
+               ],
+       ],      
        'item'    => [
                [
                        'id'          => 1,
@@ -267,8 +269,8 @@ return [
                        'starred'     => 0,
                        'origin'      => 1,
                        'guid'        => '2',
+               ],
                [
-
                        'id'          => 3,
                        'uri-id'      => 3,
                        'visible'     => 1,