From 7eb011859adcebe4475a1aee5c66d848d82c58c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sun, 17 Nov 2024 10:50:45 +0100 Subject: [PATCH] rename variable in tests bootstrap for consitency --- docs/add_your_event_plugin.md | 2 +- tests/bootstrap.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/add_your_event_plugin.md b/docs/add_your_event_plugin.md index 44ec1f4..165f285 100644 --- a/docs/add_your_event_plugin.md +++ b/docs/add_your_event_plugin.md @@ -180,7 +180,7 @@ In the pipeline we want to run each event plugins integration tests in a single To activate/load your plugin add it to the switch statement within the function `_manually_load_plugin()` within `tests/bootstrap.php`. ```php - switch ( $activitypub_event_extension_integration_filter ) { + switch ( $activitypub_event_bridge_integration_filter ) { ... case 'my_event_plugin': $plugin_file = 'my-event-plugin/my-event-plugin.php'; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index df5b41e..4262f2b 100755 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -35,10 +35,10 @@ function _manually_load_plugin() { require_once $plugin_dir . 'activitypub/activitypub.php'; // Capture the --filter argument. - $activitypub_event_extension_integration_filter = null; + $activitypub_event_bridge_integration_filter = null; foreach ( $_SERVER['argv'] as $arg ) { if ( strpos( $arg, '--filter=' ) === 0 ) { - $activitypub_event_extension_integration_filter = substr( $arg, strlen( '--filter=' ) ); + $activitypub_event_bridge_integration_filter = substr( $arg, strlen( '--filter=' ) ); break; } } @@ -49,7 +49,7 @@ function _manually_load_plugin() { $plugin_file = null; // See if we want to run integration tests for a specific event-plugin. - switch ( $activitypub_event_extension_integration_filter ) { + switch ( $activitypub_event_bridge_integration_filter ) { case 'the_events_calendar': $plugin_file = 'the-events-calendar/the-events-calendar.php'; break; @@ -84,14 +84,14 @@ function _manually_load_plugin() { } // Hot fix that allows using Events Manager within unit tests, because the em_init() is later not run as admin. - if ( 'events_manager' === $activitypub_event_extension_integration_filter ) { + if ( 'events_manager' === $activitypub_event_bridge_integration_filter ) { require_once $plugin_dir . 'events-manager/em-install.php'; em_create_events_table(); em_create_events_meta_table(); em_create_locations_table(); } - if ( 'modern_events_calendar_lite' === $activitypub_event_extension_integration_filter ) { + if ( 'modern_events_calendar_lite' === $activitypub_event_bridge_integration_filter ) { require_once $plugin_dir . 'modern-events-calendar-lite/app/libraries/factory.php'; $mec_factory = new MEC_factory(); $mec_factory->install();