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:
Sergey Biryukov 2016-02-26 00:38:25 +00:00
parent 701f639e30
commit 918da6f8c2
1 changed files with 14 additions and 0 deletions

View File

@ -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
*/ */