コード例 #1
0
 /**
  * @covers Robo47_View_Helper_Ckeditor::ckeditor
  */
 public function testCkeditorWithInitModeJQueryAndNoCKEditorOptions()
 {
     $options = array('initMode' => 'jquery', 'placement' => 'append', 'editorOptions' => '');
     $this->_helper->setOptions($options);
     $view = $this->getView();
     $textarea = $view->formTextarea('foo', 'baa', array('id' => 'foobaa'));
     $code = $this->_helper->ckeditor('foo', 'baa', array('id' => 'foobaa'), array());
     $expected = $textarea;
     $this->assertEquals($expected, $code);
     $code = '<script type="text/javascript">' . PHP_EOL . '    //<![CDATA[' . PHP_EOL . '$(document).ready( function() { ' . PHP_EOL . 'CKEDITOR.replace(\'foobaa\');' . PHP_EOL . '});' . PHP_EOL . '    //]]>' . PHP_EOL . '</script>';
     $this->assertEquals($code, (string) $view->HeadScript());
 }