Mirate API\SavedSearches tests
This commit is contained in:
parent
de1e839a2b
commit
23939cd0f1
|
@ -3532,18 +3532,4 @@ class ApiTest extends FixtureTest
|
|||
{
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the api_saved_searches_list() function.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testApiSavedSearchesList()
|
||||
{
|
||||
// $result = api_saved_searches_list('json');
|
||||
// self::assertEquals(1, $result['terms'][0]['id']);
|
||||
// self::assertEquals(1, $result['terms'][0]['id_str']);
|
||||
// self::assertEquals('Saved search', $result['terms'][0]['name']);
|
||||
// self::assertEquals('Saved search', $result['terms'][0]['query']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Test\src\Module\Api\Twitter;
|
||||
|
||||
use Friendica\Module\Api\Twitter\SavedSearches;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\Util\ApiResponseDouble;
|
||||
|
||||
class SavedSearchesTest extends ApiTest
|
||||
{
|
||||
public function test()
|
||||
{
|
||||
SavedSearches::rawContent(['extension' => 'json']);
|
||||
|
||||
$result = json_decode(ApiResponseDouble::getOutput());
|
||||
|
||||
self::assertEquals(1, $result[0]->id);
|
||||
self::assertEquals(1, $result[0]->id_str);
|
||||
self::assertEquals('Saved search', $result[0]->name);
|
||||
self::assertEquals('Saved search', $result[0]->query);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user