WordPress.org

Make WordPress Core

#45077 closed enhancement (fixed)

REST API: Improve term meta tests

Reported by: SergeyBiryukov Owned by: pento
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: REST API Keywords: has-patch needs-refresh
Focuses: rest-api Cc:
PR Number:

Description

Bringing over @birgire's patch from #39122:

  • Removes duplicated array key assertion: $this->assertArrayHasKey( 'meta', $data );
  • Adds @ticket annotations.
  • Use assertSame instead of assertEquals, as null, false and '' are equal under assertEquals.
  • Use assertFalse instead of assertEquals( false, ... )

Attachments (1)

39122.3.diff (3.9 KB) - added by SergeyBiryukov 14 months ago.

Download all attachments as: .zip

Change History (4)

#1 @danielbachhuber
14 months ago

  • Focuses rest-api added
  • Keywords needs-refresh added; commit removed
  • Milestone changed from 5.0 to 5.1

Bumping to 5.1 because it's not critical for 5.0. The patch could use a refresh too.

#2 @pento
11 months ago

  • Owner set to pento
  • Status changed from new to assigned

#3 @pento
11 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 44510:

Tests: Improve REST API tests for categories and tags.

Props birgire, SergeyBiryukov.
See #39122.
Fixes #45077.

Note: See TracTickets for help on using tickets.