Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45077 closed enhancement (fixed)

REST API: Improve term meta tests

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

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 6 years ago.

Download all attachments as: .zip

Change History (4)

#1 @danielbachhuber
6 years 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
6 years ago

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

#3 @pento
6 years 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.