Merge pull request #630 from shama/patch-typos

Typos in Test Cases
This commit is contained in:
José Lorenzo Rodríguez 2012-04-27 07:42:40 -07:00
commit d80b1ef7f6
2 changed files with 8 additions and 8 deletions

View file

@ -343,14 +343,14 @@ class DbAclTest extends CakeTestCase {
* @return void * @return void
*/ */
public function testCheckMissingPermission() { public function testCheckMissingPermission() {
$this->Acl->check('users', 'NonExistant', 'read'); $this->Acl->check('users', 'NonExistent', 'read');
} }
/** /**
* testDbAclCascadingDeny function * testDbAclCascadingDeny function
* *
* Setup the acl permissions such that Bobs inherits from admin. * 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 * @return void
*/ */
@ -477,7 +477,7 @@ class DbAclTest extends CakeTestCase {
/** /**
* debug function - to help editing/creating test cases for the ACL component * 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 * 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 * Only designed to work with the db based ACL
* *

View file

@ -2537,15 +2537,15 @@ class NumberTree extends CakeTestModel {
* @param mixed $currentLevel * @param mixed $currentLevel
* @param mixed $parent_id * @param mixed $parent_id
* @param string $prefix * @param string $prefix
* @param bool $hierachial * @param bool $hierarchal
* @return void * @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) { if (!$parentId) {
$db = ConnectionManager::getDataSource($this->useDbConfig); $db = ConnectionManager::getDataSource($this->useDbConfig);
$db->truncate($this->table); $db->truncate($this->table);
$this->save(array($this->name => array('name' => '1. Root'))); $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()); $this->create(array());
} }
@ -2558,7 +2558,7 @@ class NumberTree extends CakeTestModel {
$data = array($this->name => array('name' => $name)); $data = array($this->name => array('name' => $name));
$this->create($data); $this->create($data);
if ($hierachial) { if ($hierarchal) {
if ($this->name == 'UnconventionalTree') { if ($this->name == 'UnconventionalTree') {
$data[$this->name]['join'] = $parentId; $data[$this->name]['join'] = $parentId;
} else { } else {
@ -2566,7 +2566,7 @@ class NumberTree extends CakeTestModel {
} }
} }
$this->save($data); $this->save($data);
$this->initialize($levelLimit, $childLimit, $currentLevel + 1, $this->id, $name, $hierachial); $this->initialize($levelLimit, $childLimit, $currentLevel + 1, $this->id, $name, $hierarchal);
} }
} }