mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Migrating AclBehaviorTest to PHPUnit
This commit is contained in:
parent
0aff378be8
commit
e381be7a85
1 changed files with 9 additions and 9 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue