diff --git a/tests/tests/TestBehatTags.php b/tests/tests/TestBehatTags.php index c804d59a..5a2fe1b7 100644 --- a/tests/tests/TestBehatTags.php +++ b/tests/tests/TestBehatTags.php @@ -115,6 +115,8 @@ public function test_behat_tags_wp_version_github_token( $env, $expected ): void $expected .= '&&~@broken'; if ( 'sqlite' !== getenv( 'WP_CLI_TEST_OBJECT_CACHE' ) ) { $expected .= '&&~@require-object-cache'; + } else { + $expected .= '&&~@skip-object-cache'; } if ( in_array( $env, array( 'WP_VERSION=trunk', 'WP_VERSION=nightly' ), true ) ) { $expected .= '&&~@broken-trunk'; @@ -205,6 +207,8 @@ public function test_behat_tags_php_version(): void { $expected .= '&&~@github-api&&~@broken'; if ( 'sqlite' !== getenv( 'WP_CLI_TEST_OBJECT_CACHE' ) ) { $expected .= '&&~@require-object-cache'; + } else { + $expected .= '&&~@skip-object-cache'; } $db_type = getenv( 'WP_CLI_TEST_DBTYPE' ); @@ -279,6 +283,8 @@ public function test_behat_tags_extension(): void { $base_expecteds = array( '~@github-api', '~@broken' ); if ( 'sqlite' !== getenv( 'WP_CLI_TEST_OBJECT_CACHE' ) ) { $base_expecteds[] = '~@require-object-cache'; + } else { + $base_expecteds[] = '~@skip-object-cache'; } $expected = '--tags=' . implode( '&&', array_merge( $base_expecteds, $expecteds ) ); $output = $this->run_behat_tags_script(); @@ -335,6 +341,8 @@ public function test_behat_tags_db_version(): void { $base_expecteds = array( '~@github-api', '~@broken' ); if ( 'sqlite' !== getenv( 'WP_CLI_TEST_OBJECT_CACHE' ) ) { $base_expecteds[] = '~@require-object-cache'; + } else { + $base_expecteds[] = '~@skip-object-cache'; } $expected = '--tags=' . implode( '&&', array_merge( $base_expecteds, $expecteds ) ); $output = $this->run_behat_tags_script(); @@ -397,6 +405,8 @@ public function test_behat_tags_os(): void { $base_expecteds = array( '~@github-api', '~@broken' ); if ( 'sqlite' !== getenv( 'WP_CLI_TEST_OBJECT_CACHE' ) ) { $base_expecteds[] = '~@require-object-cache'; + } else { + $base_expecteds[] = '~@skip-object-cache'; } $expected = '--tags=' . implode( '&&', array_merge( $base_expecteds, $expecteds ) ); $output = $this->run_behat_tags_script(); @@ -440,6 +450,8 @@ public function test_behat_tags_skip_db_type(): void { $base_expecteds = array( '~@github-api', '~@broken' ); if ( 'sqlite' !== getenv( 'WP_CLI_TEST_OBJECT_CACHE' ) ) { $base_expecteds[] = '~@require-object-cache'; + } else { + $base_expecteds[] = '~@skip-object-cache'; } $expected = '--tags=' . implode( '&&', array_merge( $base_expecteds, $expecteds ) ); $output = $this->run_behat_tags_script(); diff --git a/utils/behat-tags.php b/utils/behat-tags.php index a032917d..d9d7e35a 100644 --- a/utils/behat-tags.php +++ b/utils/behat-tags.php @@ -168,6 +168,8 @@ function get_db_version() { if ( 'sqlite' !== getenv( 'WP_CLI_TEST_OBJECT_CACHE' ) ) { $skip_tags[] = '@require-object-cache'; +} else { + $skip_tags[] = '@skip-object-cache'; } if ( $wp_version && in_array( $wp_version, array( 'nightly', 'trunk' ), true ) ) {