-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Description
Summary
The test-form-wc-order.php file contains 5 tests with weak assertTrue(true) assertions that only verify code executes without throwing errors.
Location
tests/php/includes/forms/test-form-wc-order.php (introduced in #295)
Affected Tests
test_add_meta_boxes_with_null_post(line 214)test_order_edit_form_top_outputs_form_data(line 276)test_render_meta_box_with_post_object(line 302)test_render_meta_box_with_order_object(line 328)test_save_order_returns_early_without_acf_data(line 346)
Suggested Approach
Refactor to use meaningful assertions similar to the pattern used in #333:
- Use
acf_get_validation_errors()where applicable - Check for specific output content with
assertStringContainsString() - Verify action hooks are/aren't added with
has_action()
Related
Follow-up to #333 which refactored similar weak assertions in other form type tests.
Metadata
Metadata
Assignees
Labels
No labels