diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 529dae0ef..6d71ef1bd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,7 +3,7 @@ colors="true" > - + tests/ tests/ diff --git a/tests/test-behat-tags.php b/tests/test-behat-tags.php index 1cf82c7f3..d92289c11 100644 --- a/tests/test-behat-tags.php +++ b/tests/test-behat-tags.php @@ -44,7 +44,12 @@ public function test_behat_tags_wp_version_github_token( $env, $expected ) { file_put_contents( $this->temp_dir . '/features/wp_version.feature', $contents ); $output = exec( "cd {$this->temp_dir}; $env php $behat_tags" ); - $this->assertSame( '--tags=' . $expected . '&&~@broken', $output ); + + $expected .= '&&~@broken'; + if ( in_array( $env, array( 'WP_VERSION=trunk', 'WP_VERSION=nightly' ), true ) ) { + $expected .= '&&~@broken-trunk'; + } + $this->assertSame( '--tags=' . $expected, $output ); putenv( false === $env_wp_version ? 'WP_VERSION' : "WP_VERSION=$env_wp_version" ); putenv( false === $env_github_token ? 'GITHUB_TOKEN' : "GITHUB_TOKEN=$env_github_token" ); diff --git a/utils/behat-tags.php b/utils/behat-tags.php index d9eb2f954..659c96cdb 100644 --- a/utils/behat-tags.php +++ b/utils/behat-tags.php @@ -76,6 +76,10 @@ function version_tags( # Skip tests known to be broken. $skip_tags[] = '@broken'; +if ( $wp_version && in_array( $wp_version, array( 'nightly', 'trunk' ), true ) ) { + $skip_tags[] = '@broken-trunk'; +} + # Require PHP extension, eg 'imagick'. function extension_tags( $features_folder = 'features' ) { $extension_tags = array();