Skip to content

Commit

Permalink
Add feature test for updated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Dec 20, 2024
1 parent 6210ffa commit 28d9802
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/behat/features/plugin-check.feature
Original file line number Diff line number Diff line change
Expand Up @@ -719,3 +719,34 @@ Feature: Test that the WP-CLI command works.
"""
readme_invalid_contributors
"""

Scenario: Check duplicated error messages for hidden files and application files
Given a WP install with the Plugin Check plugin
And a wp-content/plugins/foo-sample/foo-sample.php file:
"""
<?php
/**
* Plugin Name: Foo Sample
* Plugin URI: https://foo-sample.com
* Description: Custom plugin.
* Version: 0.1.0
* Author: WordPress Performance Team
* Author URI: https://make.wordpress.org/performance/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
"""
And a wp-content/plugins/foo-sample/.DS_Store file:
"""
"""

When I run the WP-CLI command `plugin check foo-sample --checks=file_type`
Then STDOUT should contain:
"""
hidden_files
"""
And STDOUT should not contain:
"""
application_detected
"""

0 comments on commit 28d9802

Please sign in to comment.