Re enable Blocks/Lists test
This commit is contained in:
parent
6b03ee2922
commit
7ca47e8d21
|
@ -87,6 +87,6 @@ class Lists extends ContactEndpoint
|
|||
|
||||
self::setLinkHeader();
|
||||
|
||||
System::jsonExit($return);
|
||||
$this->response->exit('lists', ['lists' => $return]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Twitter\Account;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Account\RateLimitStatus;
|
||||
|
@ -11,7 +12,7 @@ class RateLimitStatusTest extends ApiTest
|
|||
{
|
||||
public function testWithJson()
|
||||
{
|
||||
$rateLimitStatus = new RateLimitStatus(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']);
|
||||
$rateLimitStatus = new RateLimitStatus(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), ['REQUEST_METHOD' => Router::GET], ['extension' => 'json']);
|
||||
$response = $rateLimitStatus->run();
|
||||
|
||||
$result = json_decode($response->getBody());
|
||||
|
|
|
@ -2,30 +2,28 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Twitter\Blocks;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Blocks\Lists;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
|
||||
class ListsTest extends ApiTest
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_f() function.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testApiStatusesFWithBlocks()
|
||||
{
|
||||
// $result = api_statuses_f('blocks');
|
||||
// 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_blocks_list() function.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testApiBlocksList()
|
||||
{
|
||||
// $result = api_blocks_list('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 testApiBlocksListWithUndefinedCursor()
|
||||
{
|
||||
self::markTestIncomplete('Needs refactoring of Lists - replace filter_input() with $request parameter checks');
|
||||
|
||||
// $_GET['cursor'] = 'undefined';
|
||||
// self::assertFalse(api_blocks_list('json'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user