mirror of
https://github.com/friendica/friendica
synced 2024-11-18 06:23:41 +00:00
Mirate API\SavedSearches tests
This commit is contained in:
parent
de1e839a2b
commit
23939cd0f1
2 changed files with 22 additions and 14 deletions
|
@ -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']);
|
||||
}
|
||||
}
|
||||
|
|
22
tests/src/Module/Api/Twitter/SavedSearchesTest.php
Normal file
22
tests/src/Module/Api/Twitter/SavedSearchesTest.php
Normal file
|
@ -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 a new issue