summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoseph.olstad2017-06-15 16:01:25 (GMT)
committerolstjos2017-06-15 16:01:25 (GMT)
commitde340cf8e93c0c233ef1dbdaf0145fdd9b331d8c (patch)
treea1f32586ca7567d6e24daa75855e6d65261e7b3f
parent45c2fad460342af4af3225c50f4c1ecde1fad7b5 (diff)
Issue #2886184 by joseph.olstad: Fix media_wysiwyg.paragraph_fix_filter tests, which are failing in PHP 5.3
-rw-r--r--modules/media_wysiwyg/tests/media_wysiwyg.paragraph_fix_filter.test19
1 files changed, 10 insertions, 9 deletions
diff --git a/modules/media_wysiwyg/tests/media_wysiwyg.paragraph_fix_filter.test b/modules/media_wysiwyg/tests/media_wysiwyg.paragraph_fix_filter.test
index 5c6f6c5..610d4f2 100644
--- a/modules/media_wysiwyg/tests/media_wysiwyg.paragraph_fix_filter.test
+++ b/modules/media_wysiwyg/tests/media_wysiwyg.paragraph_fix_filter.test
@@ -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)));
}