From 93b93b450f63a65abce604cf09c69f7f2eed90f4 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Thu, 1 Mar 2018 10:52:34 +0100 Subject: [PATCH] WP.I18n: add additional unit test 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 --- WordPress/Tests/WP/I18nUnitTest.1.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/WordPress/Tests/WP/I18nUnitTest.1.inc b/WordPress/Tests/WP/I18nUnitTest.1.inc index 9311b6e46b..8cd28a6559 100644 --- a/WordPress/Tests/WP/I18nUnitTest.1.inc +++ b/WordPress/Tests/WP/I18nUnitTest.1.inc @@ -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