[wp-trac] [WordPress Trac] #25118: Unit Tests: Restrict locales in test_locale_floats in db.php

WordPress Trac noreply at wordpress.org
Thu Aug 22 14:51:02 UTC 2013


#25118: Unit Tests: Restrict locales in test_locale_floats in db.php
--------------------------+-----------------------------
 Reporter:  nofearinc     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Unit Tests    |    Version:  trunk
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 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
 [http://www.php.net/manual/en/function.setlocale.php 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.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25118>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list