Navigation Menu

Skip to content

Commit

Permalink
Fix typos in test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Apr 27, 2012
1 parent 6bb8b22 commit eb059d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php
Expand Up @@ -343,14 +343,14 @@ public function testCheckInvalidPermission() {
* @return void
*/
public function testCheckMissingPermission() {
$this->Acl->check('users', 'NonExistant', 'read');
$this->Acl->check('users', 'NonExistent', 'read');
}

/**
* testDbAclCascadingDeny function
*
* Setup the acl permissions such that Bobs inherits from admin.
* deny Admin delete access to a specific resource, check the permisssions are inherited.
* deny Admin delete access to a specific resource, check the permissions are inherited.
*
* @return void
*/
Expand Down Expand Up @@ -477,7 +477,7 @@ public function testRevoke() {
/**
* debug function - to help editing/creating test cases for the ACL component
*
* To check the overal ACL status at any time call $this->__debug();
* To check the overall ACL status at any time call $this->__debug();
* Generates a list of the current aro and aco structures and a grid dump of the permissions that are defined
* Only designed to work with the db based ACL
*
Expand Down
10 changes: 5 additions & 5 deletions lib/Cake/Test/Case/Model/models.php
Expand Up @@ -2537,15 +2537,15 @@ class NumberTree extends CakeTestModel {
* @param mixed $currentLevel
* @param mixed $parent_id
* @param string $prefix
* @param bool $hierachial
* @param bool $hierarchal
* @return void
*/
public function initialize($levelLimit = 3, $childLimit = 3, $currentLevel = null, $parentId = null, $prefix = '1', $hierachial = true) {
public function initialize($levelLimit = 3, $childLimit = 3, $currentLevel = null, $parentId = null, $prefix = '1', $hierarchal = true) {
if (!$parentId) {
$db = ConnectionManager::getDataSource($this->useDbConfig);
$db->truncate($this->table);
$this->save(array($this->name => array('name' => '1. Root')));
$this->initialize($levelLimit, $childLimit, 1, $this->id, '1', $hierachial);
$this->initialize($levelLimit, $childLimit, 1, $this->id, '1', $hierarchal);
$this->create(array());
}

Expand All @@ -2558,15 +2558,15 @@ public function initialize($levelLimit = 3, $childLimit = 3, $currentLevel = nul
$data = array($this->name => array('name' => $name));
$this->create($data);

if ($hierachial) {
if ($hierarchal) {
if ($this->name == 'UnconventionalTree') {
$data[$this->name]['join'] = $parentId;
} else {
$data[$this->name]['parent_id'] = $parentId;
}
}
$this->save($data);
$this->initialize($levelLimit, $childLimit, $currentLevel + 1, $this->id, $name, $hierachial);
$this->initialize($levelLimit, $childLimit, $currentLevel + 1, $this->id, $name, $hierarchal);
}
}

Expand Down

0 comments on commit eb059d3

Please sign in to comment.