From: Hypolite Petovan Date: Wed, 4 Jul 2018 03:37:52 +0000 (-0400) Subject: Fix dataset ids for otheruser/frienduser X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b2b984433c3313fb40de774dc02f8450ccc1cded;p=friendica.git Fix dataset ids for otheruser/frienduser Remove debug --- diff --git a/tests/ApiTest.php b/tests/ApiTest.php index 81f77531de..c7f3f8cd65 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -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); } diff --git a/tests/datasets/api.yml b/tests/datasets/api.yml index eacb30a507..25c9dade60 100644 --- a/tests/datasets/api.yml +++ b/tests/datasets/api.yml @@ -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