Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#28119 closed enhancement (fixed)

Category API PHPUnit Tests

Reported by: mdbitz's profile mdbitz Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Taxonomy Keywords:
Focuses: Cc:


Attached is a patch of unit tests for the Category API. A subset of the api strictly calls the applicable term / taxonomy api and as such tests weren't written for those functions.

Covered Category API functions

  • get_all_category_ids
  • get_category_by_slug
  • _make_cat_compat
  • get_cat_name
  • get_cat_ID
  • get_category_by_path

Updated group of term_is_ancestor_of test method as it includes validation of cat_is_ancestor_of function.

PHPUnit --group category.php

Attachments (1)

28119.diff (8.4 KB) - added by mdbitz 10 years ago.
category.php Unit Tests

Download all attachments as: .zip

Change History (4)

10 years ago

category.php Unit Tests

#1 @SergeyBiryukov
10 years ago

  • Component changed from General to Taxonomy
  • Summary changed from Cateogry API PHPUnit Tests to Category API PHPUnit Tests

#2 @wonderboymusic
10 years ago

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

In 28566:

Add unit tests for functions in wp-includes/category.php.

Props mdbitz.
Fixes #28119.

#3 @wonderboymusic
10 years ago

  • Milestone changed from Awaiting Review to 4.0
Note: See TracTickets for help on using tickets.