private function PotxTestCase::parseFile in Translation template extractor 7
Same name and namespace in other branches
- 6.3 tests/potx.test \PotxTestCase::parseFile()
- 7.3 tests/potx.test \PotxTestCase::parseFile()
- 7.2 tests/potx.test \PotxTestCase::parseFile()
Parse the given file with the given API version.
5 calls to PotxTestCase::parseFile()
- PotxTestCase::testDrupal5 in tests/
potx.test - Test parsing of Drupal 5 module.
- PotxTestCase::testDrupal6 in tests/
potx.test - Test parsing of Drupal 6 module.
- PotxTestCase::testDrupal7 in tests/
potx.test - Test parsing of Drupal 7 module.
- PotxTestCase::testDrupalInfo in tests/
potx.test - Test parsing of Drupal 6 info file. Drupal 5 and 7 have no other rules.
- PotxTestCase::testDrupalJS in tests/
potx.test - Test parsing of a Drupal JS file.
File
- tests/
potx.test, line 216 - Tests to ensure that the template extractor works as intended.
Class
- PotxTestCase
- @file Tests to ensure that the template extractor works as intended.
Code
private function parseFile($filename, $api_version, $string_mode = POTX_STRING_RUNTIME) {
global $_potx_store, $_potx_strings, $_potx_install;
$_potx_store = $_potx_strings = $_potx_install = array();
potx_status('set', POTX_STATUS_STRUCTURED);
_potx_process_file($filename, 0, '_potx_save_string', '_potx_save_version', $api_version);
_potx_build_files($string_mode, POTX_BUILD_SINGLE, 'general', '_potx_save_string', '_potx_save_version', '_potx_get_header', NULL, NULL, $api_version);
// Grab .po representation of parsed content.
ob_start();
_potx_write_files('potx-test.po');
$this->potx_output = ob_get_clean();
//debug(var_export($this->potx_output, TRUE));
$this->potx_status = potx_status('get', TRUE);
//debug(var_export($this->potx_status, TRUE));
}