Skip to content

Commit 7e8ff26

Browse files
meravicbravobernal
authored andcommitted
Fix PHPCS failures in radio regression tests
1 parent e083a6a commit 7e8ff26

1 file changed

Lines changed: 4 additions & 24 deletions

File tree

tests/php/includes/fields/test-class-acf-field-radio.php

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,8 @@ public function test_update_value_save_other_choice_handles_json_field_without_i
158158
)
159159
);
160160

161-
set_error_handler(
162-
static function ( $errno, $errstr ) {
163-
throw new \RuntimeException( $errstr, $errno );
164-
}
165-
);
166-
167-
try {
168-
$result = $this->field_instance->update_value( 'custom_value', $this->post_id, $field );
169-
$this->assertSame( 'custom_value', $result );
170-
} finally {
171-
restore_error_handler();
172-
}
161+
$result = $this->field_instance->update_value( 'custom_value', $this->post_id, $field );
162+
$this->assertSame( 'custom_value', $result );
173163
}
174164

175165
/**
@@ -183,18 +173,8 @@ public function test_update_value_save_other_choice_handles_missing_field_identi
183173
);
184174
unset( $field['key'] );
185175

186-
set_error_handler(
187-
static function ( $errno, $errstr ) {
188-
throw new \RuntimeException( $errstr, $errno );
189-
}
190-
);
191-
192-
try {
193-
$result = $this->field_instance->update_value( 'custom_value', $this->post_id, $field );
194-
$this->assertSame( 'custom_value', $result );
195-
} finally {
196-
restore_error_handler();
197-
}
176+
$result = $this->field_instance->update_value( 'custom_value', $this->post_id, $field );
177+
$this->assertSame( 'custom_value', $result );
198178
}
199179

200180
/**

0 commit comments

Comments
 (0)