Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Bardo committed Jan 18, 2017
1 parent 26e6d5a commit a4a4d24
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
Empty file removed .david-dev
Empty file.
9 changes: 9 additions & 0 deletions tests/test-class-gem-official.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ public function test_init() {
* @see GEM_Official::i18n()
*/
public function test_i18n() {

global $l10n;

if ( empty( $l10n ) ) {

return;

}

unload_textdomain( 'godaddy-email-marketing' );
$this->assertFalse( is_textdomain_loaded( 'godaddy-email-marketing' ) );

Expand Down
18 changes: 13 additions & 5 deletions tests/test-class-gem-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,22 @@ public function test_validate_non_api_change() {
public function test_generate_help_tab_content() {

$domains = array(
'www',
'uk',
'el',
'www' => 'www',
'uk' => 'ua',
'el' => 'gr',
);

foreach ( $domains as $domain ) {
foreach ( $domains as $lang => $domain ) {

update_option( 'WPLANG', $domain );
$closure = function() use ( $lang, &$closure ) {

remove_filter( 'pre_option_WPLANG', $closure );

return $lang;

};

add_filter( 'pre_option_WPLANG', $closure );

$instance = new GEM_Settings();

Expand Down

0 comments on commit a4a4d24

Please sign in to comment.