Skip to content

Commit

Permalink
Update for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Oct 14, 2024
1 parent 7b75fd4 commit 23ee5f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public function run( Check_Result $result ) {
'RequiresPlugins' => 'Requires Plugins',
);

$restricted_labels = array(); // Reserved for future use.
$restricted_labels = array(
'RestrictedLabel' => 'Restricted Label',
); // Reserved for future use.

$plugin_header = $this->get_plugin_data( $plugin_main_file, array_merge( $labels, $restricted_labels ) );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function test_run_with_errors() {
$this->assertNotEmpty( $errors );
$this->assertNotEmpty( $warnings );

$this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_restricted_fields' ) ) );
$this->assertCount( 0, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_restricted_fields' ) ) );
$this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_invalid_requires_wp' ) ) );
$this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_invalid_requires_php' ) ) );
$this->assertCount( 1, wp_list_filter( $warnings['load.php'][0][0], array( 'code' => 'plugin_header_invalid_plugin_uri_domain' ) ) );
Expand Down

0 comments on commit 23ee5f5

Please sign in to comment.