mirror of
https://github.com/friendica/friendica
synced 2025-04-23 20:30:10 +00:00
Reenable Followers&Friends Lists and fixes a array_reverse() Bug
This commit is contained in:
parent
7ca47e8d21
commit
6d8b8d95b1
4 changed files with 32 additions and 39 deletions
|
@ -2,30 +2,28 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Twitter\Followers;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Followers\Lists;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
|
||||
class ListsTest extends ApiTest
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_f() function.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testApiStatusesFWithFollowers()
|
||||
{
|
||||
// $result = api_statuses_f('followers');
|
||||
// self::assertArrayHasKey('user', $result);
|
||||
}
|
||||
$lists = new Lists(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), ['REQUEST_METHOD' => Router::GET]);
|
||||
$response = $lists->run();
|
||||
|
||||
/**
|
||||
* Test the api_statuses_followers() function.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testApiStatusesFollowers()
|
||||
{
|
||||
// $result = api_statuses_followers('json');
|
||||
// self::assertArrayHasKey('user', $result);
|
||||
$body = (string)$response->getBody();
|
||||
|
||||
self::assertJson($body);
|
||||
|
||||
$json = json_decode($body);
|
||||
|
||||
self::assertIsArray($json->users);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,6 +33,8 @@ class ListsTest extends ApiTest
|
|||
*/
|
||||
public function testApiStatusesFollowersWithUndefinedCursor()
|
||||
{
|
||||
self::markTestIncomplete('Needs refactoring of Lists - replace filter_input() with $request parameter checks');
|
||||
|
||||
// $_GET['cursor'] = 'undefined';
|
||||
// self::assertFalse(api_statuses_followers('json'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue