WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#30397 closed defect (bug) (fixed)

Slightly confusing is_email() test name

Reported by: dlh Owned by: boonebgorges
Milestone: 4.1 Priority: normal
Severity: minor Version: 4.1
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

is_email() returns the string on success, not true, so test_returns_true_if_given_a_valid_email_address isn't strictly accurate.

I bring it up only after having wanted to use the is_email() tests during a demonstration as an example of a simpler unit test in core. I decided against it because I thought it might confuse someone that the test didn't use assertTrue().

Attachments (1)

30397.patch (778 bytes) - added by dlh 6 years ago.

Download all attachments as: .zip

Change History (5)

@dlh
6 years ago

#1 @dlh
6 years ago

  • Severity changed from normal to minor

#2 @johnbillion
6 years ago

  • Component changed from General to Build/Test Tools
  • Keywords has-patch added

#3 @boonebgorges
6 years ago

  • Milestone changed from Awaiting Review to 4.1

Yes, good call.

#4 @boonebgorges
6 years ago

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

In 30392:

Better test method name in formatting/IsEmail.php.

Props dlh.
Fixes #30397.

Note: See TracTickets for help on using tickets.