]> git.mxchange.org Git - friendica.git/commitdiff
Fix tests error/failures
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 4 Jul 2018 04:09:17 +0000 (00:09 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Wed, 4 Jul 2018 04:09:17 +0000 (00:09 -0400)
- Fix undenifed index: author-network notice
- Fix assertion mismatch in testApiDirectMessagesNewWithUserId

tests/ApiTest.php

index c7f3f8cd657076402d12f54fedc671b85b9fada9..1a94b0d46ab4c99c0486e67a271ecca1459750fd 100644 (file)
@@ -2338,6 +2338,7 @@ class ApiTest extends DatabaseTest
                                'body' => '',
                                'verb' => '',
                                'author-id' => 42,
+                               'author-network' => \Friendica\Core\Protocol::DFRN,
                                'plink' => '',
                        ]
                ];
@@ -2359,6 +2360,7 @@ class ApiTest extends DatabaseTest
                                'body' => '',
                                'verb' => '',
                                'author-id' => 42,
+                               'author-network' => \Friendica\Core\Protocol::DFRN,
                                'plink' => '',
                        ]
                ];
@@ -2729,7 +2731,7 @@ class ApiTest extends DatabaseTest
        public function testApiDirectMessagesNewWithUserId()
        {
                $_POST['text'] = 'message_text';
-               $_POST['user_id'] = $this->friendUser['id'];
+               $_POST['user_id'] = $this->otherUser['id'];
                $result = api_direct_messages_new('json');
                $this->assertEquals(['direct_message' => ['error' => -1]], $result);
        }