Skip to content

Commit

Permalink
Add scenarion in feature test for checking license in single file plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Oct 25, 2024
1 parent 7a73b21 commit 1d2d26f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/behat/features/plugin-check.feature
Original file line number Diff line number Diff line change
Expand Up @@ -631,3 +631,25 @@ Feature: Test that the WP-CLI command works.
"""
Success: Checks complete. No errors found.
"""

Scenario: Check for missing license in single file plugin
Given a WP install with the Plugin Check plugin
And a wp-content/plugins/foo-single.php file:
"""
<?php
/**
* Plugin Name: Foo Single
* Plugin URI: https://foo-single.com
* Description: Custom plugin.
* Version: 0.1.0
* Author: WordPress Performance Team
* Author URI: https://make.wordpress.org/performance/
*/
"""

When I run the WP-CLI command `plugin check foo-single.php`
Then STDOUT should contain:
"""
plugin_header_no_license
"""

0 comments on commit 1d2d26f

Please sign in to comment.