Add Event Sources Logic (ActivityPub follows) #86

Open
linos wants to merge 95 commits from event_sources into main
Showing only changes of commit 60ebd72e41 - Show all commits

View file

@ -135,7 +135,14 @@ class Test_Outbox_Parser extends \WP_UnitTestCase {
'object' => 'https://remote2.example/@actor/status/2',
),
);
$count = \Event_Bridge_For_ActivityPub\Outbox_Parser::import_events_from_items( $items, 'https://remote.example/@organizer' );
// The function we want to test is private, so we need a Reflection class.
$reflection = new \ReflectionClass( \Event_Bridge_For_ActivityPub\Outbox_Parser::class );
$method = $reflection->getMethod( 'import_events_from_items' );
$method->setAccessible( true );
$count = $method->invoke( null, $items, 'https://remote.example/@organizer' );
$this->assertEquals( 2, $count );