Projet

Général

Profil

Révision b0dc3a2e

Ajouté par Julien Enselme il y a plus de 7 ans

Update to Drupal 7.52

Voir les différences:

drupal7/modules/simpletest/drupal_web_test_case.php
853 853
   */
854 854
  protected $cookieFile = NULL;
855 855

  
856
  /**
857
   * The cookies of the page currently loaded in the internal browser.
858
   *
859
   * @var array
860
   */
861
  protected $cookies = array();
862

  
856 863
  /**
857 864
   * Additional cURL options.
858 865
   *
......
942 949
  protected function drupalCreateNode($settings = array()) {
943 950
    // Populate defaults array.
944 951
    $settings += array(
945
      'body'      => array(LANGUAGE_NONE => array(array())),
946 952
      'title'     => $this->randomName(8),
947 953
      'comment'   => 2,
948 954
      'changed'   => REQUEST_TIME,
......
957 963
      'language'  => LANGUAGE_NONE,
958 964
    );
959 965

  
966
    // Add the body after the language is defined so that it may be set
967
    // properly.
968
    $settings += array(
969
      'body' => array($settings['language'] => array(array())),
970
    );
971

  
960 972
    // Use the original node's created time for existing nodes.
961 973
    if (isset($settings['created']) && !isset($settings['date'])) {
962 974
      $settings['date'] = format_date($settings['created'], 'custom', 'Y-m-d H:i:s O');
......
1693 1705
      $GLOBALS['conf']['language_default'] = $this->originalLanguageDefault;
1694 1706
    }
1695 1707

  
1696
    // Close the CURL handler.
1708
    // Close the CURL handler and reset the cookies array so test classes
1709
    // containing multiple tests are not polluted.
1697 1710
    $this->curlClose();
1711
    $this->cookies = array();
1698 1712
  }
1699 1713

  
1700 1714
  /**
......
2760 2774
        $path = substr($path, $length);
2761 2775
      }
2762 2776
      // Ensure that we have an absolute path.
2763
      if ($path[0] !== '/') {
2777
      if (empty($path) || $path[0] !== '/') {
2764 2778
        $path = '/' . $path;
2765 2779
      }
2766 2780
      // Finally, prepend the $base_url.

Formats disponibles : Unified diff