Skip to content

Commit

Permalink
Adding tests to AclShell::view()
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 7, 2009
1 parent 2cc8ae6 commit c305b7a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cake/tests/cases/console/libs/acl.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,21 @@ function testViewWithModelForeignKeyOutput() {

$this->Task->view();
}

/**
* test view with an argument
*
* @return void
**/
function testViewWithArgument() {
$this->Task->args = array('aro', 'admins');
$this->Task->expectAt(0, 'out', array('Aro tree:'));
$this->Task->expectAt(1, 'out', array(' [2] admins'));
$this->Task->expectAt(2, 'out', array(' [3] Gandalf'));
$this->Task->expectAt(3, 'out', array(' [4] Elrond'));
$this->Task->view();
}

/**
* test the method that splits model.foreign key. and that it returns an array.
*
Expand Down Expand Up @@ -297,5 +312,6 @@ function testGetPath() {
$this->Task->expectAt(3, 'out', array(' [4] Elrond'));
$this->Task->getPath();
}

}
?>

0 comments on commit c305b7a

Please sign in to comment.