mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:00:16 +00:00
rename and move ApiTest to ApiTestCase
This commit is contained in:
parent
06667fc37c
commit
b3cf518628
49 changed files with 113 additions and 116 deletions
|
@ -5,26 +5,23 @@
|
|||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
namespace Friendica\Test\src\Module\Api;
|
||||
namespace Friendica\Test;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Special\HTTPException;
|
||||
use Friendica\Security\Authentication;
|
||||
use Friendica\Security\BasicAuth;
|
||||
use Friendica\Test\FixtureTestCase;
|
||||
use Friendica\Test\Util\AppDouble;
|
||||
use Friendica\Test\Util\AuthenticationDouble;
|
||||
use Friendica\Test\Util\AuthTestConfig;
|
||||
use Mockery\MockInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
abstract class ApiTest extends FixtureTestCase
|
||||
abstract class ApiTestCase extends FixtureTestCase
|
||||
{
|
||||
// User data that the test database is populated with
|
||||
const SELF_USER = [
|
|
@ -10,7 +10,7 @@ namespace Friendica\Test\src\Factory\Api\Twitter;
|
|||
use Friendica\DI;
|
||||
use Friendica\Factory\Api\Twitter\DirectMessage;
|
||||
use Friendica\Test\FixtureTestCase;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class DirectMessageTest extends FixtureTestCase
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ class DirectMessageTest extends FixtureTestCase
|
|||
$id = $ids[0]['id'];
|
||||
|
||||
$directMessage = (new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()))
|
||||
->createFromMailId($id, ApiTest::SELF_USER['id'])
|
||||
->createFromMailId($id, ApiTestCase::SELF_USER['id'])
|
||||
->toArray();
|
||||
|
||||
self::assertEquals('item_title' . "\n" . 'item_body', $directMessage['text']);
|
||||
|
@ -49,7 +49,7 @@ class DirectMessageTest extends FixtureTestCase
|
|||
$id = $ids[0]['id'];
|
||||
|
||||
$directMessage = (new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()))
|
||||
->createFromMailId($id, ApiTest::SELF_USER['id'], 'html')
|
||||
->createFromMailId($id, ApiTestCase::SELF_USER['id'], 'html')
|
||||
->toArray();
|
||||
|
||||
self::assertEquals('item_title', $directMessage['title']);
|
||||
|
@ -68,7 +68,7 @@ class DirectMessageTest extends FixtureTestCase
|
|||
$id = $ids[0]['id'];
|
||||
|
||||
$directMessage = (new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()))
|
||||
->createFromMailId($id, ApiTest::SELF_USER['id'], 'plain')
|
||||
->createFromMailId($id, ApiTestCase::SELF_USER['id'], 'plain')
|
||||
->toArray();
|
||||
|
||||
self::assertEquals('item_title', $directMessage['title']);
|
||||
|
@ -90,7 +90,7 @@ class DirectMessageTest extends FixtureTestCase
|
|||
$id = $ids[0]['id'];
|
||||
|
||||
$directMessage = (new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()))
|
||||
->createFromMailId($id, ApiTest::SELF_USER['id'], 'plain', $$GETUSEROBJECTS$$)
|
||||
->createFromMailId($id, ApiTestCase::SELF_USER['id'], 'plain', $$GETUSEROBJECTS$$)
|
||||
->toArray();
|
||||
|
||||
self::assertTrue(!isset($directMessage['sender']));
|
||||
|
|
|
@ -17,7 +17,7 @@ use Friendica\Factory\Api\Twitter\Mention;
|
|||
use Friendica\Factory\Api\Twitter\Status;
|
||||
use Friendica\Factory\Api\Twitter\Url;
|
||||
use Friendica\Test\FixtureTestCase;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class StatusTest extends FixtureTestCase
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ class StatusTest extends FixtureTestCase
|
|||
public function testApiConvertItem()
|
||||
{
|
||||
$status = $this->statusFactory
|
||||
->createFromItemId(13, ApiTest::SELF_USER['id'])
|
||||
->createFromItemId(13, ApiTestCase::SELF_USER['id'])
|
||||
->toArray();
|
||||
|
||||
self::assertStringStartsWith('item_title', $status['text']);
|
||||
|
@ -108,7 +108,7 @@ class StatusTest extends FixtureTestCase
|
|||
public function testApiGetEntitiesWithIncludeEntities()
|
||||
{
|
||||
$status = $this->statusFactory
|
||||
->createFromItemId(13, ApiTest::SELF_USER['id'], true)
|
||||
->createFromItemId(13, ApiTestCase::SELF_USER['id'], true)
|
||||
->toArray();
|
||||
|
||||
self::assertIsArray($status['entities']);
|
||||
|
@ -130,7 +130,7 @@ class StatusTest extends FixtureTestCase
|
|||
$posts = DI::dba()->selectToArray('post-view', ['uri-id']);
|
||||
foreach ($posts as $item) {
|
||||
$status = $this->statusFactory
|
||||
->createFromUriId($item['uri-id'], ApiTest::SELF_USER['id'])
|
||||
->createFromUriId($item['uri-id'], ApiTestCase::SELF_USER['id'])
|
||||
->toArray();
|
||||
|
||||
self::assertIsInt($status['id']);
|
||||
|
|
|
@ -11,7 +11,7 @@ use Friendica\DI;
|
|||
use Friendica\Factory\Api\Twitter\User;
|
||||
use Friendica\Network\HTTPException\NotFoundException;
|
||||
use Friendica\Test\FixtureTestCase;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class UserTest extends FixtureTestCase
|
||||
{
|
||||
|
@ -22,11 +22,11 @@ class UserTest extends FixtureTestCase
|
|||
*/
|
||||
protected function assertSelfUser(array $user)
|
||||
{
|
||||
self::assertEquals(ApiTest::SELF_USER['id'], $user['uid']);
|
||||
self::assertEquals(ApiTest::SELF_USER['id'], $user['cid']);
|
||||
self::assertEquals(ApiTestCase::SELF_USER['id'], $user['uid']);
|
||||
self::assertEquals(ApiTestCase::SELF_USER['id'], $user['cid']);
|
||||
self::assertEquals('DFRN', $user['location']);
|
||||
self::assertEquals(ApiTest::SELF_USER['name'], $user['name']);
|
||||
self::assertEquals(ApiTest::SELF_USER['nick'], $user['screen_name']);
|
||||
self::assertEquals(ApiTestCase::SELF_USER['name'], $user['name']);
|
||||
self::assertEquals(ApiTestCase::SELF_USER['nick'], $user['screen_name']);
|
||||
self::assertTrue($user['verified']);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class UserTest extends FixtureTestCase
|
|||
public function testApiGetUser()
|
||||
{
|
||||
$user = (new User(DI::logger(), DI::twitterStatus()))
|
||||
->createFromUserId(ApiTest::SELF_USER['id'])
|
||||
->createFromUserId(ApiTestCase::SELF_USER['id'])
|
||||
->toArray();
|
||||
|
||||
$this->assertSelfUser($user);
|
||||
|
@ -54,7 +54,7 @@ class UserTest extends FixtureTestCase
|
|||
$this->markTestIncomplete('Needs missing fields for profile colors at API User object first.');
|
||||
|
||||
/*
|
||||
DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'schema', 'red');
|
||||
DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'schema', 'red');
|
||||
|
||||
$userFactory = new User(DI::logger(), DI::twitterStatus());
|
||||
$user = $userFactory->createFromUserId(42);
|
||||
|
@ -76,7 +76,7 @@ class UserTest extends FixtureTestCase
|
|||
$this->markTestIncomplete('Needs missing fields for profile colors at API User object first.');
|
||||
|
||||
/*
|
||||
DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'schema', '---');
|
||||
DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'schema', '---');
|
||||
|
||||
$userFactory = new User(DI::logger(), DI::twitterStatus());
|
||||
$user = $userFactory->createFromUserId(42);
|
||||
|
@ -98,10 +98,10 @@ class UserTest extends FixtureTestCase
|
|||
$this->markTestIncomplete('Needs missing fields for profile colors at API User object first.');
|
||||
|
||||
/*
|
||||
DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'schema', '---');
|
||||
DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'nav_bg', '#123456');
|
||||
DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'link_color', '#123456');
|
||||
DI::pConfig()->set(ApiTest::SELF_USER['id'], 'frio', 'background_color', '#123456');
|
||||
DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'schema', '---');
|
||||
DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'nav_bg', '#123456');
|
||||
DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'link_color', '#123456');
|
||||
DI::pConfig()->set(ApiTestCase::SELF_USER['id'], 'frio', 'background_color', '#123456');
|
||||
|
||||
$userFactory = new User(DI::logger(), DI::twitterStatus());
|
||||
$user = $userFactory->createFromUserId(42);
|
||||
|
|
|
@ -11,10 +11,10 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Factory\Api\Twitter\DirectMessage;
|
||||
use Friendica\Module\Api\Friendica\DirectMessages\Search;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
class SearchTest extends ApiTest
|
||||
class SearchTest extends ApiTestCase
|
||||
{
|
||||
public function testEmpty()
|
||||
{
|
||||
|
|
|
@ -10,11 +10,11 @@ namespace Friendica\Test\src\Module\Api\Friendica;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Friendica\Notification;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
class NotificationTest extends ApiTest
|
||||
class NotificationTest extends ApiTestCase
|
||||
{
|
||||
public function testEmpty()
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Friendica\Photo\Delete;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class DeleteTest extends ApiTest
|
||||
class DeleteTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Friendica\Photoalbum\Delete;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class DeleteTest extends ApiTest
|
||||
class DeleteTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Friendica\Photoalbum\Update;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class UpdateTest extends ApiTest
|
||||
class UpdateTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -9,9 +9,9 @@ namespace Friendica\Test\src\Module\Api\GnuSocial\GnuSocial;
|
|||
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\GNUSocial\GNUSocial\Config;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class ConfigTest extends ApiTest
|
||||
class ConfigTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_statusnet_config() function.
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\GnuSocial\GnuSocial;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\GNUSocial\GNUSocial\Version;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class VersionTest extends ApiTest
|
||||
class VersionTest extends ApiTestCase
|
||||
{
|
||||
public function test()
|
||||
{
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\GnuSocial\Help;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\GNUSocial\Help\Test;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class TestTest extends ApiTest
|
||||
class TestTest extends ApiTestCase
|
||||
{
|
||||
public function testJson()
|
||||
{
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Mastodon\Accounts;
|
||||
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class StatusesTest extends ApiTest
|
||||
class StatusesTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_status_show() function.
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Mastodon\Accounts;
|
|||
use Friendica\App\Router;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Mastodon\Accounts\VerifyCredentials;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class VerifyCredentialsTest extends ApiTest
|
||||
class VerifyCredentialsTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_account_verify_credentials() function.
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Mastodon;
|
||||
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class ConversationsTest extends ApiTest
|
||||
class ConversationsTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_conversation_show() function.
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Mastodon;
|
||||
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class PushSubscriptionTest extends ApiTest
|
||||
class PushSubscriptionTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_account_verify_credentials() function.
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Mastodon;
|
||||
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class SearchTest extends ApiTest
|
||||
class SearchTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_search() function.
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Mastodon\Timelines;
|
||||
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class HomeTest extends ApiTest
|
||||
class HomeTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_home_timeline() function.
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Mastodon\Timelines;
|
||||
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class PublicTimelineTest extends ApiTest
|
||||
class PublicTimelineTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_public_timeline() function.
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Account\RateLimitStatus;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class RateLimitStatusTest extends ApiTest
|
||||
class RateLimitStatusTest extends ApiTestCase
|
||||
{
|
||||
public function testWithJson()
|
||||
{
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\Account;
|
|||
use Friendica\App\Router;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Account\UpdateProfile;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class UpdateProfileTest extends ApiTest
|
||||
class UpdateProfileTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_account_update_profile() function.
|
||||
|
|
|
@ -10,9 +10,9 @@ 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;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class ListsTest extends ApiTest
|
||||
class ListsTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_f() function.
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\DirectMessages;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\DirectMessages\All;
|
||||
use Friendica\Factory\Api\Twitter\DirectMessage;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class AllTest extends ApiTest
|
||||
class AllTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_direct_messages_box() function.
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Factory\Api\Twitter\DirectMessage;
|
||||
use Friendica\Module\Api\Twitter\DirectMessages\Conversation;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class ConversationTest extends ApiTest
|
||||
class ConversationTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_direct_messages_box() function.
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\DirectMessages\Destroy;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class DestroyTest extends ApiTest
|
||||
class DestroyTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Factory\Api\Twitter\DirectMessage;
|
||||
use Friendica\Module\Api\Twitter\DirectMessages\Inbox;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class InboxTest extends ApiTest
|
||||
class InboxTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_direct_messages_box() function.
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Factory\Api\Twitter\DirectMessage;
|
||||
use Friendica\Module\Api\Twitter\DirectMessages\NewDM;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class NewDMTest extends ApiTest
|
||||
class NewDMTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Factory\Api\Twitter\DirectMessage;
|
||||
use Friendica\Module\Api\Twitter\DirectMessages\Sent;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class SentTest extends ApiTest
|
||||
class SentTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_direct_messages_box() function.
|
||||
|
|
|
@ -12,9 +12,9 @@ use Friendica\Capabilities\ICanCreateResponses;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Favorites\Create;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class CreateTest extends ApiTest
|
||||
class CreateTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Favorites\Destroy;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class DestroyTest extends ApiTest
|
||||
class DestroyTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Favorites;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class FavoritesTest extends ApiTest
|
||||
class FavoritesTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_favorites() function.
|
||||
|
|
|
@ -10,9 +10,9 @@ 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;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class ListsTest extends ApiTest
|
||||
class ListsTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_f() function.
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\Friends;
|
|||
use Friendica\App\Router;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Friends\Lists;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class ListsTest extends ApiTest
|
||||
class ListsTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_f() function.
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\Friendships;
|
|||
use Friendica\App\Router;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Friendships\Incoming;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class IncomingTest extends ApiTest
|
||||
class IncomingTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_friendships_incoming() function.
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Lists\Statuses;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class StatusesTest extends ApiTest
|
||||
class StatusesTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_lists_statuses() function.
|
||||
|
|
|
@ -13,10 +13,10 @@ use Friendica\Module\Api\Twitter\Media\Upload;
|
|||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Network\HTTPException\InternalServerErrorException;
|
||||
use Friendica\Network\HTTPException\UnauthorizedException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
use Friendica\Test\Util\AuthTestConfig;
|
||||
|
||||
class UploadTest extends ApiTest
|
||||
class UploadTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\SavedSearches;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class SavedSearchesTest extends ApiTest
|
||||
class SavedSearchesTest extends ApiTestCase
|
||||
{
|
||||
public function test()
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Statuses\Destroy;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class DestroyTest extends ApiTest
|
||||
class DestroyTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Statuses\Mentions;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class MentionsTest extends ApiTest
|
||||
class MentionsTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_mentions() function.
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Statuses\NetworkPublicTimeline;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class NetworkPublicTimelineTest extends ApiTest
|
||||
class NetworkPublicTimelineTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_networkpublic_timeline() function.
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Statuses\Retweet;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class RetweetTest extends ApiTest
|
||||
class RetweetTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Statuses\Show;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class ShowTest extends ApiTest
|
||||
class ShowTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_show() function.
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace Friendica\Test\src\Module\Api\Twitter\Statuses;
|
|||
use Friendica\App\Router;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Statuses\Update;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class UpdateTest extends ApiTest
|
||||
class UpdateTest extends ApiTestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Statuses\UserTimeline;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class UserTimelineTest extends ApiTest
|
||||
class UserTimelineTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_statuses_user_timeline() function.
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Users\Lookup;
|
||||
use Friendica\Network\HTTPException\NotFoundException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class LookupTest extends ApiTest
|
||||
class LookupTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_users_lookup() function.
|
||||
|
|
|
@ -12,9 +12,9 @@ use Friendica\Capabilities\ICanCreateResponses;
|
|||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Users\Search;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class SearchTest extends ApiTest
|
||||
class SearchTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_users_search() function.
|
||||
|
|
|
@ -11,9 +11,9 @@ use Friendica\App\Router;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Twitter\Users\Show;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class ShowTest extends ApiTest
|
||||
class ShowTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_users_show() function.
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
namespace Friendica\Test\src\Module;
|
||||
|
||||
use Friendica\Module\BaseApi;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class BaseApiTest extends ApiTest
|
||||
class BaseApiTest extends ApiTestCase
|
||||
{
|
||||
public function testWithWrongAuth()
|
||||
{
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
namespace Friendica\Test\src\Security;
|
||||
|
||||
use Friendica\Security\BasicAuth;
|
||||
use Friendica\Test\src\Module\Api\ApiTest;
|
||||
use Friendica\Test\ApiTestCase;
|
||||
|
||||
class BasicAuthTest extends ApiTest
|
||||
class BasicAuthTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* Test the api_source() function.
|
||||
|
|
Loading…
Reference in a new issue