Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#25118 closed defect (bug) (fixed)

Unit Tests: Restrict locales in test_locale_floats in db.php

Reported by: nofearinc's profile nofearinc Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.6
Component: Unit Tests Keywords: has-patch
Focuses: Cc:


While running phpunit tests/db.php from the wordpress-tests project I got the following error:

1) Tests_DB::test_locale_floats
    constant(): Couldn't find constant LC_PAPER

Apparently I don't have a constant defined on my Linux (Fedora) box called LC_PAPER. I didn't see that as a possible argument in the setlocale function either.

I would suggest that we verify if a category is an existing constant when we try to set it as a locale.

Attachments (1)

25118.patch (549 bytes) - added by nofearinc 11 years ago.

Download all attachments as: .zip

Change History (3)

11 years ago

#1 @SergeyBiryukov
11 years ago

  • Milestone changed from Awaiting Review to 3.7
  • Version changed from trunk to 3.6

#2 @SergeyBiryukov
11 years ago

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

In 25084:

Check if a locale category is an existing constant when restoring locale settings in Tests_DB::test_locale_floats(). props nofearinc. fixes #25118.

Note: See TracTickets for help on using tickets.