From c1e932bc0bdb9e2b5ba41b9a3499130a0b04bc4e Mon Sep 17 00:00:00 2001 From: Renato Alves <19148962+renatonascalves@users.noreply.github.com> Date: Mon, 1 Apr 2024 21:59:09 -0300 Subject: [PATCH 1/2] Test using memcache --- .github/workflows/unit-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 721ba730..4da7dfd2 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -15,8 +15,9 @@ jobs: matrix: php: [8.1, 8.2] wordpress: ["latest"] - uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main + uses: alleyinteractive/.github/.github/workflows/php-tests.yml@feature/object-cache with: database: '' php: ${{ matrix.php }} wordpress: ${{ matrix.wordpress }} + object-cache: "memcached" From 1da13d0e5aba9be0ca37895f3f83359851a62e40 Mon Sep 17 00:00:00 2001 From: Renato Alves <19148962+renatonascalves@users.noreply.github.com> Date: Mon, 1 Apr 2024 22:01:00 -0300 Subject: [PATCH 2/2] Test --- tests/Feature/FullPageCache404Test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/FullPageCache404Test.php b/tests/Feature/FullPageCache404Test.php index 2d83b11a..a759e1e2 100644 --- a/tests/Feature/FullPageCache404Test.php +++ b/tests/Feature/FullPageCache404Test.php @@ -81,7 +81,7 @@ public function test_feature_is_disabled_if_ssl_is_off(): void { */ public function test_feature_is_disabled_if_object_cache_is_not_in_use(): void { - if ( ! wp_using_ext_object_cache() ) { + if ( wp_using_ext_object_cache() ) { $this->markTestSkipped( 'This test requires that an external object cache is in use.' ); } @@ -113,7 +113,7 @@ public function test_feature_is_disabled_if_object_cache_is_not_in_use(): void { */ public function test_full_page_cache_404_returns_cache(): void { - if ( ! wp_using_ext_object_cache() ) { + if ( wp_using_ext_object_cache() ) { $this->markTestSkipped( 'This test requires that an external object cache is in use.' ); }