mirror of
https://github.com/friendica/friendica
synced 2025-04-24 01:50:17 +00:00
Re enable Blocks/Lists test
This commit is contained in:
parent
6b03ee2922
commit
7ca47e8d21
3 changed files with 17 additions and 16 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue