mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 15:19:55 +03:00
parent
c27a300e02
commit
286790727b
2 changed files with 3 additions and 17 deletions
|
@ -62,6 +62,9 @@ class MastodonBridge extends BridgeAbstract
|
|||
public function collectData()
|
||||
{
|
||||
$user = $this->fetchAP($this->getURI());
|
||||
if (!isset($user['outbox'])) {
|
||||
throw new \Exception('Unable to find the outbox');
|
||||
}
|
||||
$content = $this->fetchAP($user['outbox']);
|
||||
if (is_array($content['first'])) { // mobilizon
|
||||
$content = $content['first'];
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace RssBridge\Tests\Bridges;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class MastodonBridgeTest extends TestCase
|
||||
{
|
||||
public function test()
|
||||
{
|
||||
\Configuration::loadConfiguration(['cache' => ['type' => 'null']]);
|
||||
$b = new \MastodonBridge();
|
||||
// https://bird.makeup/users/asmongold/remote_follow
|
||||
$b->setDatas(['canusername' => '@asmongold@bird.makeup']);
|
||||
$b->collectData();
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue