Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

importing the fix for ZF-5711 #309

Closed
wants to merge 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 1, 2011
  1. @robertbasic
This page is out of date. Refresh to see the latest.
View
2  library/Zend/Dojo/View/Helper/Editor.php
@@ -62,7 +62,7 @@ class Editor extends Dijit
* JSON-encoded parameters
* @var array
*/
- protected $_jsonParams = array('captureEvents', 'events', 'plugins');
+ protected $_jsonParams = array('captureEvents', 'events', 'plugins', 'extraPlugins');
/**
* dijit.Editor
View
10 tests/Zend/Dojo/View/Helper/EditorTest.php
@@ -179,4 +179,14 @@ public function testHelperShouldOnlyUseTextareaInNoscriptTag()
$html = $this->helper->direct('foo');
$this->assertRegexp('#<noscript><textarea[^>]*>#', $html, $html);
}
+
+ /** @group ZF-5711 */
+ public function testHelperShouldJsonifyExtraPlugins()
+ {
+ $extraPlugins = array('copy', 'cut', 'paste');
+ $html = $this->helper->direct('foo', '', array('extraPlugins' => $extraPlugins));
+ $pluginsString = Json::encode($extraPlugins);
+ $pluginsString = str_replace('"', "'", $pluginsString);
+ $this->assertContains('extraPlugins="' . $pluginsString . '"', $html);
+ }
}
Something went wrong with that request. Please try again.