File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ public static function url_list( $value ) {
24
24
$ value = \explode ( PHP_EOL , $ value );
25
25
}
26
26
27
- $ value = \array_map ( 'trim ' , $ value );
28
27
$ value = \array_filter ( $ value );
28
+ $ value = \array_map ( 'trim ' , $ value );
29
29
$ value = \array_map ( 'sanitize_url ' , $ value );
30
30
$ value = \array_unique ( $ value );
31
31
Original file line number Diff line number Diff line change @@ -610,8 +610,10 @@ public function test_update_actor_json_slashing() {
610
610
$ follower = new Follower ();
611
611
$ follower ->from_array (
612
612
array (
613
- 'type ' => 'Person ' ,
614
- 'summary ' => '<p>unescaped backslash 04\2024</p> ' ,
613
+ 'type ' => 'Person ' ,
614
+ 'name ' => 'Test Follower ' ,
615
+ 'preferred_username ' => 'Follower ' ,
616
+ 'summary ' => '<p>unescaped backslash 04\2024</p> ' ,
615
617
)
616
618
);
617
619
$ unslashed_json = $ follower ->to_json ();
Original file line number Diff line number Diff line change @@ -56,9 +56,15 @@ public static function wpTearDownAfterClass() {
56
56
public function test_reprocess_outbox () {
57
57
// Create test activity objects.
58
58
$ activity = new Activity ();
59
- $ activity ->set_object ( array ( 'content ' => 'Test Content ' ) );
60
59
$ activity ->set_type ( 'Create ' );
61
60
$ activity ->set_id ( 'https://example.com/test-id ' );
61
+ $ activity ->set_object (
62
+ array (
63
+ 'id ' => 'https://example.com/test-id ' ,
64
+ 'type ' => 'Note ' ,
65
+ 'content ' => 'Test Content ' ,
66
+ )
67
+ );
62
68
63
69
// Add multiple pending activities.
64
70
$ pending_ids = array ();
@@ -149,9 +155,15 @@ function ( $event ) use ( &$scheduled_events ) {
149
155
public function test_reprocess_outbox_scheduling () {
150
156
// Create a test activity.
151
157
$ activity = new Activity ();
152
- $ activity ->set_object ( array ( 'content ' => 'Test Content ' ) );
153
158
$ activity ->set_type ( 'Create ' );
154
159
$ activity ->set_id ( 'https://example.com/test-id ' );
160
+ $ activity ->set_object (
161
+ array (
162
+ 'id ' => 'https://example.com/test-id ' ,
163
+ 'type ' => 'Note ' ,
164
+ 'content ' => 'Test Content ' ,
165
+ )
166
+ );
155
167
156
168
$ pending_id = Outbox::add ( $ activity , self ::$ user_id );
157
169
You can’t perform that action at this time.
0 commit comments