| 113 | /** |
| 114 | * @ticket 35284 |
| 115 | */ |
| 116 | function test_wp_get_pomo_file_data() { |
| 117 | $file = DIR_TESTDATA . '/pomo/empty.po'; |
| 118 | $array = wp_get_pomo_file_data( $file ); |
| 119 | $this->assertArrayHasKey( 'POT-Creation-Date', $array ); |
| 120 | $this->assertArrayHasKey( 'PO-Revision-Date', $array ); |
| 121 | $this->assertArrayHasKey( 'Project-Id-Version', $array ); |
| 122 | $this->assertArrayHasKey( 'X-Generator', $array ); |
| 123 | |
| 124 | $file = DIR_TESTDATA . '/pomo/mo.pot'; |
| 125 | $array = wp_get_pomo_file_data( $file ); |
| 126 | $this->assertNotEmpty( $array['POT-Creation-Date'] ); |
| 127 | $this->assertNotEmpty( $array['PO-Revision-Date'] ); |
| 128 | $this->assertNotEmpty( $array['Project-Id-Version'] ); |
| 129 | $this->assertArrayHasKey( 'X-Generator', $array ); |
| 130 | |
| 131 | $file = DIR_TESTDATA . '/languages/es_ES.po'; |
| 132 | $array = wp_get_pomo_file_data( $file ); |
| 133 | $this->assertArrayHasKey( 'POT-Creation-Date', $array ); |
| 134 | $this->assertNotEmpty( $array['PO-Revision-Date'] ); |
| 135 | $this->assertNotEmpty( $array['Project-Id-Version'] ); |
| 136 | $this->assertNotEmpty( $array['X-Generator'] ); |
| 137 | } |
| 138 | |