WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#35965 closed enhancement (fixed)

Unit test for get_locale()

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

Description

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 5 years ago.
Unit tests for get_locale()

Download all attachments as: .zip

Change History (6)

@realloc
5 years ago

Unit tests for get_locale()

#1 @realloc
5 years ago

  • Keywords has-patch has-unit-tests added

#2 @boonebgorges
5 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
5 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
5 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
5 years ago

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