Migrating AclBehaviorTest to PHPUnit

This commit is contained in:
José Lorenzo Rodríguez 2010-06-06 23:34:34 -04:30
parent 0aff378be8
commit e381be7a85

View file

@ -220,11 +220,11 @@ class AclBehaviorTestCase extends CakeTestCase {
*
* @return void
*/
public function startTest() {
public function setUp() {
Configure::write('Acl.database', 'test_suite');
$this->Aco =& new Aco();
$this->Aro =& new Aro();
$this->Aco = new Aco();
$this->Aro = new Aro();
}
/**
@ -243,12 +243,12 @@ class AclBehaviorTestCase extends CakeTestCase {
* @return void
*/
public function testSetup() {
$User =& new AclUser();
$User = new AclUser();
$this->assertTrue(isset($User->Behaviors->Acl->settings['User']));
$this->assertEqual($User->Behaviors->Acl->settings['User']['type'], 'requester');
$this->assertTrue(is_object($User->Aro));
$Post =& new AclPost();
$Post = new AclPost();
$this->assertTrue(isset($Post->Behaviors->Acl->settings['Post']));
$this->assertEqual($Post->Behaviors->Acl->settings['Post']['type'], 'controlled');
$this->assertTrue(is_object($Post->Aco));
@ -260,7 +260,7 @@ class AclBehaviorTestCase extends CakeTestCase {
* @return void
*/
public function testAfterSave() {
$Post =& new AclPost();
$Post = new AclPost();
$data = array(
'Post' => array(
'author_id' => 1,
@ -284,7 +284,7 @@ class AclBehaviorTestCase extends CakeTestCase {
);
$this->Aro->save($aroData);
$Person =& new AclPerson();
$Person = new AclPerson();
$data = array(
'AclPerson' => array(
'name' => 'Trent',
@ -339,7 +339,7 @@ class AclBehaviorTestCase extends CakeTestCase {
)
);
$this->Aro->save($aroData);
$Person =& new AclPerson();
$Person = new AclPerson();
$data = array(
'AclPerson' => array(
'name' => 'Trent',
@ -384,7 +384,7 @@ class AclBehaviorTestCase extends CakeTestCase {
* @return void
*/
public function testNode() {
$Person =& new AclPerson();
$Person = new AclPerson();
$aroData = array(
'Aro' => array(
'model' => 'AclPerson',