Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#35284 closed enhancement (fixed)

Unit tests for wp_get_pomo_file_data()

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

Description

I wrote an unit test for wp_get_pomo_file_data(). I needed also some header information in one of the po-files so I decided to modify the simple.po file too.

Attachments (4)

35284.patch (2.8 KB) - added by realloc 9 years ago.
Tests for wp_get_pomo_file_data and modified simple.po
35284.2.patch (2.1 KB) - added by ocean90 9 years ago.
languages.zip (711.9 KB) - added by ocean90 9 years ago.
35284.3.patch (1.2 KB) - added by realloc 9 years ago.
Refreshed tests for wp_get_pomo_file_data()

Download all attachments as: .zip

Change History (11)

@realloc
9 years ago

Tests for wp_get_pomo_file_data and modified simple.po

#1 @swissspidy
9 years ago

  • Keywords has-unit-tests added

#2 @ocean90
9 years ago

  • Milestone changed from Awaiting Review to 4.5
  • Owner set to ocean90
  • Status changed from new to reviewing
  • Version trunk deleted

@ocean90
9 years ago

@ocean90
9 years ago

#3 @ocean90
9 years ago

Attached 35284.2.patch and languages.zip.

The language files (Spanish and British English) need to be copied to tests/phpunit/data/languages. The total size of them is ~2.7 MB and the test takes also > 650ms..

@swissspidy I remember that you've linked this ticket in another one, do you know which ticket it was?

#4 follow-up: @swissspidy
9 years ago

@ocean90 Perhaps you mean #34114 where I mentioned defining the constant like in your patch?
Otherwise I'll search again tomorrow.

#5 in reply to: ↑ 4 @ocean90
9 years ago

Replying to swissspidy:

@ocean90 Perhaps you mean #34114

Yep, thanks!

#6 @ocean90
9 years ago

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

In 36563:

Tests: Add test for wp_get_installed_translations().

Introduces language files in /tests/phpunit/data/language. Each file includes the header and 5 translations.

Props realloc for initial patch.
Fixes #35284.

@realloc
9 years ago

Refreshed tests for wp_get_pomo_file_data()

#7 @ocean90
9 years ago

In 36710:

L10n: Add test for wp_get_pomo_file_data().

Props realloc.
See #35284.

Note: See TracTickets for help on using tickets.