From 97b62577cac3a71726e53256e9828bdc8ec66722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 21 Sep 2024 08:01:13 +0200 Subject: [PATCH] test --- .forgejo/workflows/phpunit.yml | 5 +++-- tests/bootstrap.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/phpunit.yml b/.forgejo/workflows/phpunit.yml index 2b54af1..7bc8ec0 100644 --- a/.forgejo/workflows/phpunit.yml +++ b/.forgejo/workflows/phpunit.yml @@ -43,11 +43,12 @@ jobs: - name: Install mysqladmin run: sudo apt update && sudo apt -y upgrade && sudo apt -y install mysql-client + - name: Clone plugin dependencies + run: git clone https://code.event-federation.eu/Event-Federation/wordpress-activitypub.git /tmp/wordpress/wp-content/plugins/activitypub/ + - name: Setup Test Environment run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 latest - - run: cat /tmp/wordpress-tests-lib/wp-tests-config.php - - name: Unit Testing run: phpunit env: diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 72f381a..7d30eb9 100755 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -29,7 +29,7 @@ require_once "{$_tests_dir}/includes/functions.php"; * Manually load the plugin being tested. */ function _manually_load_plugin() { - require dirname( dirname( __FILE__ ) ) . '/activitypub-event-extensions.php'; + require dirname( __DIR__ ) . '/activitypub-event-extensions.php'; } tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );