Fix dataset ids for otheruser/frienduser
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 4 Jul 2018 03:37:52 +0000 (23:37 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Wed, 4 Jul 2018 03:37:52 +0000 (23:37 -0400)
Remove debug

tests/ApiTest.php
tests/datasets/api.yml

index 81f7753..c7f3f8c 100644 (file)
@@ -12,8 +12,6 @@ use Friendica\Network\BadRequestException;
 use Friendica\Network\HTTPException;
 use Friendica\Render\FriendicaSmarty;
 
-require_once 'include/dba.php';
-
 /**
  * Tests for the API functions.
  *
@@ -2731,7 +2729,7 @@ class ApiTest extends DatabaseTest
        public function testApiDirectMessagesNewWithUserId()
        {
                $_POST['text'] = 'message_text';
-               $_POST['user_id'] = $this->otherUser['id'];
+               $_POST['user_id'] = $this->friendUser['id'];
                $result = api_direct_messages_new('json');
                $this->assertEquals(['direct_message' => ['error' => -1]], $result);
        }
@@ -3395,8 +3393,6 @@ class ApiTest extends DatabaseTest
         */
        public function testApiGetNick()
        {
-               var_dump(\dba::inArray(\dba::select('contact')));
-
                $result = api_get_nick($this->otherUser['nurl']);
                $this->assertEquals('othercontact', $result);
        }
index eacb30a..25c9dad 100644 (file)
@@ -34,7 +34,7 @@ contact:
         network: dfrn
     -
         id: 43
-        uid: 42
+        uid: 0
         # Having the same name and nick allows us to test
         # the fallback to api_get_nick() in api_get_user()
         name: othercontact
@@ -48,7 +48,7 @@ contact:
         network: dfrn
     -
         id: 44
-        uid: 0
+        uid: 42
         name: Friend contact
         nick: friendcontact
         self: 0