Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-pro committed Aug 29, 2024
1 parent 1664391 commit 43649b4
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions tests/WP/Admin/Metabox/Metabox_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,7 @@ public function test_save_postdata() {
foreach ( $meta_fields as $key => $field ) {

// Set text fields.
if ( $field['type'] === 'text' ) {
$_POST[ WPSEO_Meta::$form_prefix . $key ] = 'text';
}
elseif ( $field['type'] === 'hidden' ) {
$_POST[ WPSEO_Meta::$form_prefix . $key ] = 'hidden';
}
elseif ( $field['type'] === 'checkbox' ) {
$_POST[ WPSEO_Meta::$form_prefix . $key ] = 'on';
}
$_POST[ WPSEO_Meta::$form_prefix . $key ] = 'text';
}

// Call method that saves the $_POST data.
Expand All @@ -165,15 +157,7 @@ public function test_save_postdata() {
$value = $custom[ WPSEO_Meta::$meta_prefix . $key ][0];

// Set text fields.
if ( $field['type'] === 'text' ) {
$this->assertSame( $value, 'text' );
}
elseif ( $field['type'] === 'hidden' ) {
$this->assertSame( $value, 'hidden' );
}
elseif ( $field['type'] === 'checkbox' ) {
$this->assertSame( $value, 'on' );
}
$this->assertSame( $value, 'text' );
}
}

Expand Down

0 comments on commit 43649b4

Please sign in to comment.