Projet

Général

Profil

Révision 5587145e

Ajouté par Assos Assos il y a presque 7 ans

Update to 7.56

Voir les différences:

drupal7/modules/locale/locale.test
819 819
   *   Additional options to pass to the translation import form.
820 820
   */
821 821
  function importPoFile($contents, array $options = array()) {
822
    $name = tempnam('temporary://', "po_") . '.po';
822
    $name = drupal_tempnam('temporary://', "po_") . '.po';
823 823
    file_put_contents($name, $contents);
824 824
    $options['files[file]'] = $name;
825 825
    $this->drupalPost('admin/config/regional/translate/import', $options, t('Import'));
......
1113 1113
   *   Additional options to pass to the translation import form.
1114 1114
   */
1115 1115
  function importPoFile($contents, array $options = array()) {
1116
    $name = tempnam('temporary://', "po_") . '.po';
1116
    $name = drupal_tempnam('temporary://', "po_") . '.po';
1117 1117
    file_put_contents($name, $contents);
1118 1118
    $options['files[file]'] = $name;
1119 1119
    $this->drupalPost('admin/config/regional/translate/import', $options, t('Import'));
......
1340 1340
  function testExportTranslation() {
1341 1341
    // First import some known translations.
1342 1342
    // This will also automatically enable the 'fr' language.
1343
    $name = tempnam('temporary://', "po_") . '.po';
1343
    $name = drupal_tempnam('temporary://', "po_") . '.po';
1344 1344
    file_put_contents($name, $this->getPoFile());
1345 1345
    $this->drupalPost('admin/config/regional/translate/import', array(
1346 1346
      'langcode' => 'fr',

Formats disponibles : Unified diff