diff --git a/tests/ApiTest.php b/tests/ApiTest.php index 81f77531d..c7f3f8cd6 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 eacb30a50..25c9dade6 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