Adding tests to AclShell::view()

This commit is contained in:
mark_story 2009-08-07 08:37:31 -04:00
parent 2cc8ae631e
commit c305b7a410

View file

@ -128,6 +128,21 @@ class AclShellTest extends CakeTestCase {
$this->Task->view(); $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. * test the method that splits model.foreign key. and that it returns an array.
* *
@ -297,5 +312,6 @@ class AclShellTest extends CakeTestCase {
$this->Task->expectAt(3, 'out', array(' [4] Elrond')); $this->Task->expectAt(3, 'out', array(' [4] Elrond'));
$this->Task->getPath(); $this->Task->getPath();
} }
} }
?> ?>