Changeset 36563
- Timestamp:
- 02/17/2016 10:01:11 PM (9 years ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 15 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/bootstrap.php
r35350 r36563 26 26 define( 'WP_TESTS_TABLE_PREFIX', $table_prefix ); 27 27 define( 'DIR_TESTDATA', dirname( __FILE__ ) . '/../data' ); 28 29 define( 'WP_LANG_DIR', DIR_TESTDATA . '/languages' ); 28 30 29 31 if ( ! defined( 'WP_TESTS_FORCE_KNOWN_BUGS' ) ) -
trunk/tests/phpunit/tests/l10n.php
r36538 r36563 47 47 $this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) ); 48 48 } 49 50 /** 51 * @ticket 35284 52 */ 53 function test_wp_get_installed_translations_for_core() { 54 $installed_translations = wp_get_installed_translations( 'core' ); 55 $this->assertInternalType( 'array', $installed_translations ); 56 $textdomains_expected = array( 'admin', 'admin-network', 'continents-cities', 'default' ); 57 $this->assertEqualSets( $textdomains_expected, array_keys( $installed_translations ) ); 58 59 $this->assertNotEmpty( $installed_translations['default']['en_GB'] ); 60 $data_en_GB = $installed_translations['default']['en_GB']; 61 $this->assertEquals( '2016-01-14 21:14:29+0000', $data_en_GB['PO-Revision-Date'] ); 62 $this->assertEquals( 'Development (4.4.x)', $data_en_GB['Project-Id-Version'] ); 63 $this->assertEquals( 'GlotPress/1.0-alpha-1100', $data_en_GB['X-Generator'] ); 64 65 $this->assertNotEmpty( $installed_translations['admin']['es_ES'] ); 66 $data_es_ES = $installed_translations['admin']['es_ES']; 67 $this->assertEquals( '2015-12-22 20:26:46+0000', $data_es_ES['PO-Revision-Date'] ); 68 $this->assertEquals( 'Administration', $data_es_ES['Project-Id-Version'] ); 69 $this->assertEquals( 'GlotPress/1.0-alpha-1100', $data_es_ES['X-Generator'] ); 70 } 49 71 }
Note: See TracChangeset
for help on using the changeset viewer.