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
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
colors="true"
>
<testsuites>
<testsuite>
<testsuite name="default">
<directory prefix="spec-" suffix=".php">tests/</directory>
<directory prefix="test-" suffix=".php">tests/</directory>
</testsuite>
Expand Down
7 changes: 6 additions & 1 deletion tests/test-behat-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand Down
4 changes: 4 additions & 0 deletions utils/behat-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down