Commit de340cf8 authored by joseph.olstad's avatar joseph.olstad Committed by olstjos

Issue #2886184 by joseph.olstad: Fix media_wysiwyg.paragraph_fix_filter tests,...

Issue #2886184 by joseph.olstad: Fix media_wysiwyg.paragraph_fix_filter tests, which are failing in PHP 5.3
parent 45c2fad4
......@@ -82,13 +82,14 @@ class MediaWYSIWYGParagraphFixFilterTest extends MediaWYSIWYGTestHelper {
// Check without the filter enabled.
$html = $this->drupalGet('node/' . $nid);
$count = preg_match_all($this->regexpMediaTag, $html);
$forphp53compat = array();
$count = preg_match_all($this->regexpMediaTag, $html, $forphp53compat);
$this->assertEqual($count, 3, t('Three media tags found, found @count.', array('@count' => $count)));
$count = preg_match_all($this->regexpPWrapped, $html);
$count = preg_match_all($this->regexpPWrapped, $html, $forphp53compat);
$this->assertEqual($count, 3, t('Three media tags with original wrapping HTML present, found @count.', array('@count' => $count)));
$count = preg_match_all($this->regexpReplaced, $html);
$count = preg_match_all($this->regexpReplaced, $html, $forphp53compat);
$this->assertEqual($count, 0, t('No media tags with P replaced present, found @count.', array('@count' => $count)));
// Enable the default P fix filter.
......@@ -98,13 +99,13 @@ class MediaWYSIWYGParagraphFixFilterTest extends MediaWYSIWYGTestHelper {
$this->drupalPost('admin/config/content/formats/filtered_html', $edit, t('Save configuration'));
$html = $this->drupalGet('node/' . $nid);
$count = preg_match_all($this->regexpMediaTag, $html);
$count = preg_match_all($this->regexpMediaTag, $html, $forphp53compat);
$this->assertEqual($count, 3, t('Three media tags found, found @count.', array('@count' => $count)));
$count = preg_match_all($this->regexpPWrapped, $html);
$count = preg_match_all($this->regexpPWrapped, $html, $forphp53compat);
$this->assertEqual($count, 0, t('No media tags with original wrapping HTML present, found @count.', array('@count' => $count)));
$count = preg_match_all($this->regexpReplaced, $html);
$count = preg_match_all($this->regexpReplaced, $html, $forphp53compat);
$this->assertEqual($count, 0, t('No media tags with P replaced present, found @count.', array('@count' => $count)));
// Enable the replace P fix filter option.
......@@ -114,13 +115,13 @@ class MediaWYSIWYGParagraphFixFilterTest extends MediaWYSIWYGTestHelper {
$this->drupalPost('admin/config/content/formats/filtered_html', $edit, t('Save configuration'));
$html = $this->drupalGet('node/' . $nid);
$count = preg_match_all($this->regexpMediaTag, $html);
$count = preg_match_all($this->regexpMediaTag, $html, $forphp53compat);
$this->assertEqual($count, 3, t('Three media tags found, found @count.', array('@count' => $count)));
$count = preg_match_all($this->regexpPWrapped, $html);
$count = preg_match_all($this->regexpPWrapped, $html, $forphp53compat);
$this->assertEqual($count, 0, t('No media tags with original wrapping HTML present, found @count.', array('@count' => $count)));
$count = preg_match_all($this->regexpReplaced, $html);
$count = preg_match_all($this->regexpReplaced, $html, $forphp53compat);
$this->assertEqual($count, 3, t('Three media tags with P replaced present, found @count.', array('@count' => $count)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment