Skip to content

Commit

Permalink
Fixing test by splitting them up, testing the expected error ignored …
Browse files Browse the repository at this point in the history
…the next asserts
  • Loading branch information
Jelle Henkens authored and markstory committed Sep 10, 2011
1 parent 3cb3424 commit aa45452
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/Cake/Test/Case/View/Helper/MootoolsEngineHelperTest.php
Expand Up @@ -263,20 +263,28 @@ public function testDrag() {
$expected = '$("drag-me").makeDraggable({onComplete:onStop, onDrag:onDrag, onStart:onStart, snap:[10,10]});';
$this->assertEqual($expected, $result);
}

/**
* test drop() method
* test drop() method with the required drag option missing
*
* @return void
*/
public function testDrop() {
public function testDropWithMissingOption() {
$this->expectError();
$this->Moo->get('#drop-me');
$this->Moo->drop(array(
'drop' => 'onDrop',
'leave' => 'onLeave',
'hover' => 'onHover',
));

}
/**
* test drop() method
*
* @return void
*/
public function testDrop() {
$this->Moo->get('#drop-me');
$result = $this->Moo->drop(array(
'drop' => 'onDrop',
'leave' => 'onLeave',
Expand Down

0 comments on commit aa45452

Please sign in to comment.