L10n: Add test for `get_available_languages()`.
Props realloc. Fixes #35950. git-svn-id: https://develop.svn.wordpress.org/trunk@36718 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
701f639e30
commit
918da6f8c2
|
@ -47,6 +47,20 @@ class Tests_L10n extends WP_UnitTestCase {
|
||||||
$this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) );
|
$this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ticket 35950
|
||||||
|
*/
|
||||||
|
function test_get_available_languages() {
|
||||||
|
$array = get_available_languages();
|
||||||
|
$this->assertInternalType( 'array', $array );
|
||||||
|
|
||||||
|
$array = get_available_languages( '.' );
|
||||||
|
$this->assertEmpty( $array );
|
||||||
|
|
||||||
|
$array = get_available_languages( DIR_TESTDATA . '/languages/' );
|
||||||
|
$this->assertEquals( array( 'en_GB', 'es_ES' ), $array );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ticket 35284
|
* @ticket 35284
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue