mirror of
https://github.com/friendica/friendica
synced 2025-03-03 19:48:26 +00:00
Fix Mastodon Status tests
This commit is contained in:
parent
94b47ae4d1
commit
efd3cb30d1
1 changed files with 11 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
|||
namespace Friendica\Test\src\Factory\Api\Mastodon;
|
||||
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Hooks\HookEventBridge;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Test\FixtureTestCase;
|
||||
|
@ -21,13 +22,21 @@ class StatusTest extends FixtureTestCase
|
|||
parent::setUp();
|
||||
|
||||
DI::config()->set('system', 'no_smilies', false);
|
||||
|
||||
$this->status = DI::mstdnStatus();
|
||||
|
||||
/** @var \Friendica\Event\EventDispatcher */
|
||||
$eventDispatcher = DI::eventDispatcher();
|
||||
|
||||
foreach (HookEventBridge::getStaticSubscribedEvents() as $eventName => $methodName) {
|
||||
$eventDispatcher->addListener($eventName, [HookEventBridge::class, $methodName]);
|
||||
}
|
||||
|
||||
Hook::register('smilie', 'tests/Util/SmileyWhitespaceAddon.php', 'add_test_unicode_smilies');
|
||||
Hook::loadHooks();
|
||||
}
|
||||
|
||||
public function testSimpleStatus()
|
||||
public function testSimpleStatus(): void
|
||||
{
|
||||
$post = Post::selectFirst([], ['id' => 13]);
|
||||
$this->assertNotNull($post);
|
||||
|
@ -35,7 +44,7 @@ class StatusTest extends FixtureTestCase
|
|||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
public function testSimpleEmojiStatus()
|
||||
public function testSimpleEmojiStatus(): void
|
||||
{
|
||||
$post = Post::selectFirst([], ['id' => 14]);
|
||||
$this->assertNotNull($post);
|
||||
|
|
Loading…
Add table
Reference in a new issue