Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/tests/TestBehatTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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' );
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions utils/behat-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down
Loading