Fix test
All checks were successful
PHP Code Checker / PHP Code Checker (pull_request) Successful in 45s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Successful in 1m3s
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Successful in 1m3s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m4s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m6s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m3s
PHPUnit / PHPUnit – PHP 8.4 (pull_request) Successful in 1m1s

This commit is contained in:
André Menrath 2025-01-04 14:46:35 +01:00
parent 1c5f428289
commit 963ae48784

View file

@ -85,7 +85,7 @@ class Test_Outbox_Parser extends \WP_UnitTestCase {
array(
'id' => 'https://remote.example/@organizer/events/concert#create',
'type' => 'Create',
'actor' => 'https://remote.example/@organizer',
'actor' => self::FOLLOWED_ACTOR['id'],
'object' => array(
'id' => 'https://remote.example/@organizer/events/concert',
'type' => 'Event',
@ -99,7 +99,7 @@ class Test_Outbox_Parser extends \WP_UnitTestCase {
array(
'id' => 'https://remote.example/@organizer/events/birthday-party#create',
'type' => 'Create',
'actor' => 'https://remote.example/@organizer',
'actor' => self::FOLLOWED_ACTOR['id'],
'object' => array(
'id' => 'https://remote.example/@organizer/events/birthday-party',
'type' => 'Event',
@ -113,7 +113,7 @@ class Test_Outbox_Parser extends \WP_UnitTestCase {
array(
'id' => 'https://remote.example/@organizer/events/status/1#create',
'type' => 'Create',
'actor' => 'https://remote.example/@organizer',
'actor' => self::FOLLOWED_ACTOR['id'],
'object' => array(
'id' => 'https://remote.example/@organizer/status/1',
'type' => 'Note',
@ -125,13 +125,13 @@ class Test_Outbox_Parser extends \WP_UnitTestCase {
array(
'id' => 'https://remote.example/@organizer/likes/1',
'type' => 'Like',
'actor' => 'https://remote.example/@organizer',
'actor' => self::FOLLOWED_ACTOR['id'],
'object' => 'https://remote2.example/@actor/status/1',
),
array(
'id' => 'https://remote.example/@organizer/shares/1',
'type' => 'Announce',
'actor' => 'https://remote.example/@organizer',
'actor' => self::FOLLOWED_ACTOR['id'],
'object' => 'https://remote2.example/@actor/status/2',
),
);
@ -142,7 +142,9 @@ class Test_Outbox_Parser extends \WP_UnitTestCase {
$method = $reflection->getMethod( 'import_events_from_items' );
$method->setAccessible( true );
$count = $method->invoke( null, $items, 'https://remote.example/@organizer' );
$event_source = \Event_Bridge_For_ActivityPub\ActivityPub\Model\Event_Source::get_by_id( self::FOLLOWED_ACTOR['id'] );
$count = $method->invoke( null, $items, $event_source );
$this->assertEquals( 2, $count );