From 1aedb964a9a792283885ef2096bf9a354af55b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Wed, 2 Oct 2024 19:03:04 +0200 Subject: [PATCH] fix gatherpress tests: event must always be published --- composer.json | 2 +- tests/test-class-plugin-gatherpress.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index d091876..28fb046 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,7 @@ ], "test-debug": [ "@prepare-test", - "@test-vs-event-list" + "@test-gatherpress" ], "test-vs-event-list": "phpunit --filter=vs_event_list", "test-the-events-calendar": "phpunit --filter=the_events_calendar", diff --git a/tests/test-class-plugin-gatherpress.php b/tests/test-class-plugin-gatherpress.php index c184a8d..b2ac3eb 100644 --- a/tests/test-class-plugin-gatherpress.php +++ b/tests/test-class-plugin-gatherpress.php @@ -49,6 +49,7 @@ class Test_GatherPress extends WP_UnitTestCase { 'post_title' => 'Unit Test Event', 'post_type' => 'gatherpress_event', 'post_content' => 'Unit Test description.', + 'post_status' => 'publish', ) ); $event = new \GatherPress\Core\Event( $post_id ); @@ -77,7 +78,7 @@ class Test_GatherPress extends WP_UnitTestCase { 'post_title' => 'Unit Test Event', 'post_type' => 'gatherpress_event', 'post_content' => 'Unit Test description.', - 'post_status' => 'published', + 'post_status' => 'publish', ) ); $event = new \GatherPress\Core\Event( $post_id );