diff --git a/ci/behat-tags.php b/ci/behat-tags.php index df836b8309..fa1e60185d 100644 --- a/ci/behat-tags.php +++ b/ci/behat-tags.php @@ -17,10 +17,23 @@ function version_tags( $prefix, $current, $operator = '<' ) { if ( ! $current ) return array(); - exec( "grep '@{$prefix}-[0-9\.]*' -h -o features/*.feature | uniq", $existing_tags ); - $skip_tags = array(); + if ( 'require-wp' === $prefix ) { + if ( 'trunk' === $current ) { + // Exclude nothing. + return array(); + } + // Exclude cutting-edge. + $skip_tags[] = '@require-wp-trunk'; + + if ( 'latest' === $current ) { + return $skip_tags; + } + } + + exec( "grep '@{$prefix}-[0-9\.]*' -h -o features/*.feature | sort -u", $existing_tags ); + foreach ( $existing_tags as $tag ) { $compare = str_replace( "@{$prefix}-", '', $tag ); if ( version_compare( $current, $compare, $operator ) ) { @@ -43,7 +56,7 @@ function version_tags( $prefix, $current, $operator = '<' ) { # Require PHP extension, eg 'imagick'. function extension_tags() { $extension_tags = array(); - exec( "grep '@require-extension-[A-Za-z_]*' -h -o features/*.feature | uniq", $extension_tags ); + exec( "grep '@require-extension-[A-Za-z_]*' -h -o features/*.feature | sort -u", $extension_tags ); $skip_tags = array(); diff --git a/features/taxonomy.feature b/features/taxonomy.feature index e2d75c3169..b1f6646fbf 100644 --- a/features/taxonomy.feature +++ b/features/taxonomy.feature @@ -11,10 +11,10 @@ Feature: Manage WordPress taxonomies | category | Categories | | post | 1 | 1 | 1 | | post_tag | Tags | | post | 1 | | 1 | - When I run `wp taxonomy list --object_type=link --format=csv` + When I run `wp taxonomy list --object_type=nav_menu_item --format=csv` Then STDOUT should be CSV containing: - | name | label | description | object_type | show_tagcloud | hierarchical | public | - | link_category | Link Categories | | link | | | | + | name | label | description | object_type | show_tagcloud | hierarchical | public | + | nav_menu | Navigation Menus | | nav_menu_item | | | | Scenario: Get taxonomy When I try `wp taxonomy get invalid-taxonomy`