Projet

Général

Profil

Révision e013fa40

Ajouté par Assos Assos il y a presque 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/media/modules/media_wysiwyg/tests/media_wysiwyg.paragraph_fix_filter.test
82 82

  
83 83
    // Check without the filter enabled.
84 84
    $html = $this->drupalGet('node/' . $nid);
85
    $count = preg_match_all($this->regexpMediaTag, $html);
85
    $forphp53compat = array();
86
    $count = preg_match_all($this->regexpMediaTag, $html, $forphp53compat);
86 87
    $this->assertEqual($count, 3, t('Three media tags found, found @count.', array('@count' => $count)));
87 88

  
88
    $count = preg_match_all($this->regexpPWrapped, $html);
89
    $count = preg_match_all($this->regexpPWrapped, $html, $forphp53compat);
89 90
    $this->assertEqual($count, 3, t('Three media tags with original wrapping HTML present, found @count.', array('@count' => $count)));
90 91

  
91
    $count = preg_match_all($this->regexpReplaced, $html);
92
    $count = preg_match_all($this->regexpReplaced, $html, $forphp53compat);
92 93
    $this->assertEqual($count, 0, t('No media tags with P replaced present, found @count.', array('@count' => $count)));
93 94

  
94 95
    // Enable the default P fix filter.
......
98 99
    $this->drupalPost('admin/config/content/formats/filtered_html', $edit, t('Save configuration'));
99 100
    $html = $this->drupalGet('node/' . $nid);
100 101

  
101
    $count = preg_match_all($this->regexpMediaTag, $html);
102
    $count = preg_match_all($this->regexpMediaTag, $html, $forphp53compat);
102 103
    $this->assertEqual($count, 3, t('Three media tags found, found @count.', array('@count' => $count)));
103 104

  
104
    $count = preg_match_all($this->regexpPWrapped, $html);
105
    $count = preg_match_all($this->regexpPWrapped, $html, $forphp53compat);
105 106
    $this->assertEqual($count, 0, t('No media tags with original wrapping HTML present, found @count.', array('@count' => $count)));
106 107

  
107
    $count = preg_match_all($this->regexpReplaced, $html);
108
    $count = preg_match_all($this->regexpReplaced, $html, $forphp53compat);
108 109
    $this->assertEqual($count, 0, t('No media tags with P replaced present, found @count.', array('@count' => $count)));
109 110

  
110 111
    // Enable the replace P fix filter option.
......
114 115
    $this->drupalPost('admin/config/content/formats/filtered_html', $edit, t('Save configuration'));
115 116
    $html = $this->drupalGet('node/' . $nid);
116 117

  
117
    $count = preg_match_all($this->regexpMediaTag, $html);
118
    $count = preg_match_all($this->regexpMediaTag, $html, $forphp53compat);
118 119
    $this->assertEqual($count, 3, t('Three media tags found, found @count.', array('@count' => $count)));
119 120

  
120
    $count = preg_match_all($this->regexpPWrapped, $html);
121
    $count = preg_match_all($this->regexpPWrapped, $html, $forphp53compat);
121 122
    $this->assertEqual($count, 0, t('No media tags with original wrapping HTML present, found @count.', array('@count' => $count)));
122 123

  
123
    $count = preg_match_all($this->regexpReplaced, $html);
124
    $count = preg_match_all($this->regexpReplaced, $html, $forphp53compat);
124 125
    $this->assertEqual($count, 3, t('Three media tags with P replaced present, found @count.', array('@count' => $count)));
125 126
  }
126 127

  

Formats disponibles : Unified diff