WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#32946 closed enhancement (fixed)

Add unit tests for get_objects_in_term()

Reported by: rodrigosprimo Owned by: jorbin
Milestone: 4.3 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch
Focuses: Cc:

Description

The attached patch adds three basic unit tests for get_objects_in_term()

Attachments (2)

32946.diff (1.9 KB) - added by rodrigosprimo 3 years ago.
32946.2.diff (1.9 KB) - added by rodrigosprimo 3 years ago.

Download all attachments as: .zip

Change History (6)

@rodrigosprimo
3 years ago

#1 @rodrigosprimo
3 years ago

  • Keywords has-patch added

#2 @johnbillion
3 years ago

  • Component changed from Build/Test Tools to Taxonomy
  • Milestone changed from Awaiting Review to 4.3

Thanks!

Only thing I would change is to switch to using $terms->get_error_code() or $terms->get_error_message() in test_get_objects_in_term_should_return_invalid_taxonomy_error(), instead of using $terms->errors['invalid_taxonomy'][0] directly.

#3 @rodrigosprimo
3 years ago

Patch updated to use $terms->get_error_message(). Thanks for your feedback.

#4 @jorbin
3 years ago

  • Owner set to jorbin
  • Resolution set to fixed
  • Status changed from new to closed

In 33182:

Add Unit Tests for get_objects_in_term()

Props rodrigosprimo.
Fixes #32946.

Note: See TracTickets for help on using tickets.