Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#35965 closed enhancement (fixed)

Unit test for get_locale()

Reported by: realloc's profile realloc Owned by: boonebgorges's profile boonebgorges
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch has-unit-tests
Focuses: Cc:


I wrote some tests for get_locale().

NB: The part from line 44 to 51 is hard to test since WP_LANG is predefined as an empty string in wp-tests-config.php

Attachments (1)

35965.patch (788 bytes) - added by realloc 8 years ago.
Unit tests for get_locale()

Download all attachments as: .zip

Change History (6)

8 years ago

Unit tests for get_locale()

#1 @realloc
8 years ago

  • Keywords has-patch has-unit-tests added

#2 @boonebgorges
8 years ago

  • Milestone changed from Awaiting Review to 4.5
  • Owner set to boonebgorges
  • Status changed from new to assigned

Thanks! I'm going to break it up into separate tests and add some tests for the multisite stuff.

For future reference, I don't think there's any reason for a @ticket annotation if the only purpose of the ticket was to add unit tests. In other words: @ticket is appropriate when referring to a bug that the test describes.

#3 @boonebgorges
8 years ago

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

In 36740:

Add tests for get_locale().

Props realloc.
Fixes #35965.

#4 @boonebgorges
8 years ago

In 36741:

Tests: Don't modify global state before checking whether to skip get_locale() tests.

Introduced in [36740].

Props ocean90.
See #35965.

#5 @johnbillion
8 years ago

  • Version trunk deleted
Note: See TracTickets for help on using tickets.