Skip to content

Commit

Permalink
Adding buffer flush to ajax helper test. Test suite menus now properl…
Browse files Browse the repository at this point in the history
…y display.

Fixing Drag options.  Adding test coverage. Fixes #6266

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8135 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
markstory committed Apr 6, 2009
1 parent d74e2d1 commit 5c4f838
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cake/libs/view/helpers/ajax.php
Expand Up @@ -81,7 +81,8 @@ class AjaxHelper extends AppHelper {
*/
var $dragOptions = array(
'handle', 'revert', 'snap', 'zindex', 'constraint', 'change', 'ghosting',
'starteffect', 'reverteffect', 'endeffect'
'starteffect', 'reverteffect', 'endeffect', 'scroll', 'scrollSensitivity',
'onStart', 'onDrag', 'onDropped' , 'onEnd'
);
/**
* Options for droppable.
Expand Down
5 changes: 5 additions & 0 deletions cake/tests/cases/libs/view/helpers/ajax.test.php
Expand Up @@ -300,6 +300,10 @@ function testDraggable() {
'/script'
);
$this->assertTags($result, $expected);

$result = $this->Ajax->drag('id', array('onDrag' => 'doDrag', 'onDropped' => 'doDrop'));
$this->assertPattern('/onDrag:doDrag/', $result);
$this->assertPattern('/onDropped:doDrop/', $result);
}
/**
* testDroppable method
Expand Down Expand Up @@ -795,6 +799,7 @@ function testRemoteFunction() {
* @return void
*/
function testDiv() {
ob_flush();
$oldXUpdate = env('HTTP_X_UPDATE');

$result = $this->Ajax->div('myDiv');
Expand Down

0 comments on commit 5c4f838

Please sign in to comment.