Skip to content

Commit

Permalink
WP.I18n: add additional unit test
Browse files Browse the repository at this point in the history
Looks like the original issue was already fixed by 1267, so just adding an additional unit test to safeguard against re-introducing the issue.

Closes 719
  • Loading branch information
jrfnl committed Mar 1, 2018
1 parent c0e2913 commit 93b93b4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions WordPress/Tests/WP/I18nUnitTest.1.inc
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,12 @@ __( 'String default text domain.' ); // Ok because default domain is 'default' a
$mo->translate( $string ); // OK, not a function, but a method call.
Something\esc_html_e( $string ); // OK, not the WP function, but namespaced function call.

// Issue #719.
class Foo {
public function translate( $key ) {
return '';
}
}

// @codingStandardsChangeSetting WordPress.WP.I18n text_domain false
// @codingStandardsChangeSetting WordPress.WP.I18n check_translator_comments true

0 comments on commit 93b93b4

Please sign in to comment.