From 0e3a904fa9e04ebd43b0f82fdda2f2a56314bc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Wed, 9 Oct 2024 20:49:30 +0200 Subject: [PATCH] fix tests --- includes/activitypub/transformer/class-wp-event-manager.php | 4 ++-- tests/test-class-plugin-wp-event-manager.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/activitypub/transformer/class-wp-event-manager.php b/includes/activitypub/transformer/class-wp-event-manager.php index 1e6c3bd..6330152 100644 --- a/includes/activitypub/transformer/class-wp-event-manager.php +++ b/includes/activitypub/transformer/class-wp-event-manager.php @@ -48,7 +48,7 @@ final class WP_Event_Manager extends Event_Transformer { * @return array The Place. */ public function get_location(): ?Place { - $location_name = get_post_meta( $this->wp_object->ID, '_event_online', true ); + $location_name = get_post_meta( $this->wp_object->ID, '_event_location', true ); if ( $location_name ) { $location = new Place(); @@ -101,7 +101,7 @@ final class WP_Event_Manager extends Event_Transformer { if ( str_starts_with( $event_link_url, 'http' ) ) { return array( 'type' => 'Link', - 'name' => 'Video URL', + 'name' => \esc_html__( 'Video URL', 'activitypub-event-bridge' ), 'href' => \esc_url( $event_link_url ), 'mediaType' => 'text/html', ); diff --git a/tests/test-class-plugin-wp-event-manager.php b/tests/test-class-plugin-wp-event-manager.php index e1e9d70..f0bc7da 100644 --- a/tests/test-class-plugin-wp-event-manager.php +++ b/tests/test-class-plugin-wp-event-manager.php @@ -134,7 +134,7 @@ class Test_WP_Event_Manager extends WP_UnitTestCase { $this->assertContains( array( 'type' => 'Link', - 'name' => 'Video Link', + 'name' => __( 'Video URL', 'activitypub-event-bridge' ), 'href' => 'https://event-federation.eu/meeting-room', 'mediaType' => 'text/html', ),